r3454: moved a few more things out if includes.h into the include/system/ include...
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Nov 2004 03:13:06 +0000 (03:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:13 +0000 (13:05 -0500)
this brings us down to about 11k lines of headers included with
includes.h, while still retaining the speed of building with pch

15 files changed:
source/client/smbmount.c
source/include/includes.h
source/include/system/filesys.h
source/include/system/iconv.h
source/include/system/network.h
source/include/system/passwd.h
source/lib/cmdline/popt_common.c
source/lib/module.c
source/lib/system.c
source/lib/tdb/common/tdb.c
source/lib/xfile.c
source/libcli/clifile.c
source/torture/locktest2.c
source/utils/net/net_password.c
source/utils/ntlm_auth.c

index 5e6d0209f2e1758d305420f51c8c0cceba6e65b9..e18fb311aac52623aa7c02c8fd109d4ed2fd7870 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "system/passwd.h"
 
 #include <mntent.h>
 #include <asm/types.h>
index f45665ad0528d217410eae97549e0979f93cea4c..c511a5fb337b5aa7f0b1a7cc936373c60b5ad042 100644 (file)
@@ -349,14 +349,6 @@ typedef int (*comparison_fn_t)(const void *, const void *);
 #define INADDR_NONE 0xffffffff
 #endif
 
-#ifndef HAVE_CRYPT
-#define crypt ufc_crypt
-#endif
-
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-
 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
 #define ULTRIX_AUTH 1
 #endif
@@ -369,14 +361,6 @@ char *strdup(const char *s);
 void *memmove(void *dest,const void *src,int size);
 #endif
 
-#ifndef HAVE_INITGROUPS
-int initgroups(char *name,gid_t id);
-#endif
-
-#ifndef HAVE_RENAME
-int rename(const char *zfrom, const char *zto);
-#endif
-
 #ifndef HAVE_MKTIME
 time_t mktime(struct tm *t);
 #endif
@@ -417,47 +401,8 @@ int vasprintf(char **ptr, const char *format, va_list ap);
 #define bzero(a,b) memset((a),'\0',(b))
 #endif
 
-#ifdef REPLACE_GETPASS
-#define getpass(prompt) getsmbpass((prompt))
-#endif
-
-/*
- * Some older systems seem not to have MAXHOSTNAMELEN
- * defined.
- */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 254
-#endif
-
-/* yuck, I'd like a better way of doing this */
-#define DIRP_SIZE (256 + 32)
-
-/*
- * glibc on linux doesn't seem to have MSG_WAITALL
- * defined. I think the kernel has it though..
- */
-
-#ifndef MSG_WAITALL
-#define MSG_WAITALL 0
-#endif
-
-/* Load header file for dynamic linking stuff */
-#ifdef HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
 extern int DEBUGLEVEL;
 
-#ifndef RTLD_LAZY
-#define RTLD_LAZY 0
-#endif
-
-/* needed for some systems without iconv. Doesn't really matter
-   what error code we use */
-#ifndef EILSEQ
-#define EILSEQ EIO
-#endif
-
 /* add varargs prototypes with printf checking */
 #ifndef HAVE_SNPRINTF_DECL
 int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
index dc13e148e5adae18358e217ead127cafd8ed1acf..1ddb6b687c1b050b65ce6ef4858d7ea88681022f 100644 (file)
 #include <sys/xattr.h>
 #endif
 
+/* Load header file for dynamic linking stuff */
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#ifndef RTLD_LAZY
+#define RTLD_LAZY 0
+#endif
+
 
 /* Some POSIX definitions for those without */
  
 #define S_IXOTH 00001           /* execute permission: other */
 #endif
 
+#ifndef O_ACCMODE
+#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
+#endif
+
+#ifndef HAVE_RENAME
+int rename(const char *zfrom, const char *zto);
+#endif
index c70fc6b242a3602283d1cda3eaa4a00414605866..bace51c029773fcbbe1ba978d714e5b0104be7ec 100644 (file)
@@ -33,3 +33,9 @@
 #include <ctype.h>
 #endif
 
+/* needed for some systems without iconv. Doesn't really matter
+   what error code we use */
+#ifndef EILSEQ
+#define EILSEQ EIO
+#endif
+
index 8b9fe0bcc5436778083d5bcfb8189c62d467ea17..d380245865d3801a23d855812fff564b416d871b 100644 (file)
 #define inet_ntoa rep_inet_ntoa
 #endif
 
+/*
+ * glibc on linux doesn't seem to have MSG_WAITALL
+ * defined. I think the kernel has it though..
+ */
+#ifndef MSG_WAITALL
+#define MSG_WAITALL 0
+#endif
+
+/*
+ * Some older systems seem not to have MAXHOSTNAMELEN
+ * defined.
+ */
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 254
+#endif
+
index ba7fc93d376477d861e8cdda2cc4345fbbe54368..215f53d1386772461e2dbc369c27f14ad4dc8545 100644 (file)
 #include <compat.h>
 #endif
 
+#ifdef REPLACE_GETPASS
+#define getpass(prompt) getsmbpass((prompt))
+#endif
+
+#ifndef HAVE_INITGROUPS
+int initgroups(char *name,gid_t id);
+#endif
+
+#ifndef HAVE_CRYPT
+#define crypt ufc_crypt
+#endif
+
index 80be23d3649839a901f09259d83f112500224320..7d4dead4de5837a66ca7b6ff32e273e69f4b09d1 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "system/passwd.h"
 #include "lib/cmdline/popt_common.h"
 
 /* Handle command line options:
index 58764683d52b93fcffa5b2dfc372ede2c4ee3440..9e568f601adde6d7ae02a2c2caa17e89a20b3ac1 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "system/dir.h"
+#include "system/filesys.h"
 
 #ifdef HAVE_DLOPEN
 
index 906219bd91d052bb8b13a4ba065db58f5817027b..5e106c96eb5aa1bd144e5400bd626ae83d34b3c7 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "system/wait.h"
+#include "system/filesys.h"
 
 /*
    The idea is that this file will eventually have wrappers around all
index d41809c3d838005d479c45ae4b2b9ca6c382932a..afe2ca1621d2a1f8089c77647ab429039b11fd2a 100644 (file)
@@ -68,6 +68,7 @@
 #include "includes.h"
 #include "system/time.h"
 #include "system/shmem.h"
+#include "system/filesys.h"
 #endif
 
 #define TDB_MAGIC_FOOD "TDB file\n"
index 8572bd857a900b0e639a5049470d32c0a3c6ca69..856e5dd6e6f2351e823de89e9dad636c8862d018 100644 (file)
@@ -30,6 +30,7 @@
 */
 
 #include "includes.h"
+#include "system/filesys.h"
 
 #define XBUFSIZE BUFSIZ
 
index cdb29beb2dd872f380958e6179dc37c24ca8a93e..992d2c225da4a68950459ddb1f37f5ad7d90b493 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "system/filesys.h"
 #include "libcli/raw/libcliraw.h"
 
 /****************************************************************************
index e2220a3b1fb8e44c881c85ccf7698459020e9caf..7d729ca94132866a9a8b09efb9efe655c6bb16ac 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "system/passwd.h"
 
 static fstring password;
 static fstring username;
index 5da18d94b5835a291f3b2a567166e43468885239..01682bd506e2c144fffbd45ec5776f46820b1707 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "system/passwd.h"
 
 /*
  * Code for Changing and setting a password
index 060e590d15b25fc2780adb44fc49f0048dbaa3e9..787977abcea212dca7f055587ac099123d2a130c 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "includes.h"
+#include "system/passwd.h"
 #include "lib/cmdline/popt_common.h"
 #include "auth/auth.h"