r10664: Include limits.h in replace.h for HOST_NAME_MAX
authorJelmer Vernooij <jelmer@samba.org>
Fri, 30 Sep 2005 23:10:20 +0000 (23:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:39:15 +0000 (13:39 -0500)
source/include/system/filesys.h
source/lib/replace/replace.h

index 589bf9b0d90e3adcdf7f78d854d0ac5cd05428e6..e81eec13e9d85300406e7ca438b54dce1f87d022 100644 (file)
 #include <sys/xattr.h>
 #endif
 
-/* Load header file for dynamic linking stuff */
-#ifdef HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
 
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
 
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-
-#ifndef RTLD_LAZY
-#define RTLD_LAZY 0
-#endif
-
-
 /* Some POSIX definitions for those without */
  
 #ifndef S_IFDIR
 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
 #endif
 
-#ifndef HAVE_RENAME
-int rename(const char *zfrom, const char *zto);
-#endif
-
-#ifndef HAVE_FTRUNCATE
-int ftruncate(int f,long l);
-#endif
-
 #ifndef MAXPATHLEN
 #define MAXPATHLEN 256
 #endif
index 3ad348517d917e2e559470dcea5278989387ae74..572113af8cfaf753e213c4fedd4e8f13617083a1 100644 (file)
@@ -80,6 +80,14 @@ unsigned long strtoul(const char *nptr, char **endptr, int base);
 int setenv(const char *name, const char *value, int overwrite); 
 #endif
 
+#ifndef HAVE_RENAME
+int rename(const char *zfrom, const char *zto);
+#endif
+
+#ifndef HAVE_FTRUNCATE
+int ftruncate(int f,long l);
+#endif
+
 #ifndef HAVE_VASPRINTF_DECL
 int vasprintf(char **ptr, const char *format, va_list ap);
 #endif
@@ -132,13 +140,26 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
 typedef int (*comparison_fn_t)(const void *, const void *);
 #endif
 
+/* Load header file for dynamic linking stuff */
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
 #endif
 
+#ifndef RTLD_LAZY
+#define RTLD_LAZY 0
+#endif
+
 #ifndef HAVE_SECURE_MKSTEMP
 #define mkstemp(path) rep_mkstemp(path)
 int rep_mkstemp(char *temp);
 #endif
 
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 64
+#endif
+
 #endif