s3: move some defines to a better place.
authorGünther Deschner <gd@samba.org>
Sat, 12 Feb 2011 01:51:19 +0000 (02:51 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 14 Feb 2011 10:47:19 +0000 (11:47 +0100)
Guenther

source3/include/includes.h
source3/lib/system.c

index 87061eba34cf35cd60d9dec4c1eccbd190d2812f..8c4fcfea1c64dd84430d784deb741c9f77877291 100644 (file)
@@ -179,6 +179,10 @@ typedef int ber_int_t;
 #if !defined(LDAPS_PORT)
 #define LDAPS_PORT 636
 #endif
+
+/* function declarations not included in proto.h */
+LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
+
 #else
 #undef HAVE_LDAP
 #endif
@@ -556,16 +560,6 @@ enum timestamp_set_resolution {
        TIMESTAMP_SET_NT_OR_BETTER
 };
 
-#ifdef HAVE_BROKEN_GETGROUPS
-#define GID_T int
-#else
-#define GID_T gid_t
-#endif
-
-#ifndef NGROUPS_MAX
-#define NGROUPS_MAX 32 /* Guess... */
-#endif
-
 /* Our own fstrings */
 
 /*
@@ -844,13 +838,6 @@ char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATT
 #define XATTR_REPLACE 0x2       /* set value, fail if attr does not exist */
 #endif
 
-#ifdef HAVE_LDAP
-
-/* function declarations not included in proto.h */
-LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
-
-#endif /* HAVE_LDAP */
-
 #if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
 ssize_t readahead(int fd, off64_t offset, size_t count);
 #endif
index 48623b981552e4f07a0c5dd057e4d199a2c15127..24d3c09d58a4b5bd15e9f20989f879fcf173edb1 100644 (file)
@@ -1134,6 +1134,10 @@ void sys_srandom(unsigned int seed)
 #endif
 }
 
+#ifndef NGROUPS_MAX
+#define NGROUPS_MAX 32 /* Guess... */
+#endif
+
 /**************************************************************************
  Returns equivalent to NGROUPS_MAX - using sysconf if needed.
 ****************************************************************************/
@@ -1154,6 +1158,13 @@ int groups_max(void)
 ****************************************************************************/
 
 #if defined(HAVE_BROKEN_GETGROUPS)
+
+#ifdef HAVE_BROKEN_GETGROUPS
+#define GID_T int
+#else
+#define GID_T gid_t
+#endif
+
 static int sys_broken_getgroups(int setlen, gid_t *gidset)
 {
        GID_T gid;