summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-02 03:13:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:13 -0500
commit6148deca663f7b6504b044120b166d6c9ae28750 (patch)
tree77cde75020079440f070a2f4450623e28ae2dd07 /source4
parentedbfc0f6e70150e321822365bf0eead2821551bd (diff)
downloadsamba-6148deca663f7b6504b044120b166d6c9ae28750.tar.gz
samba-6148deca663f7b6504b044120b166d6c9ae28750.tar.bz2
samba-6148deca663f7b6504b044120b166d6c9ae28750.zip
r3454: moved a few more things out if includes.h into the include/system/ include files.
this brings us down to about 11k lines of headers included with includes.h, while still retaining the speed of building with pch (This used to be commit 10188869ef072309ca580b8b933e172571fcdda7)
Diffstat (limited to 'source4')
-rw-r--r--source4/client/smbmount.c1
-rw-r--r--source4/include/includes.h55
-rw-r--r--source4/include/system/filesys.h16
-rw-r--r--source4/include/system/iconv.h6
-rw-r--r--source4/include/system/network.h16
-rw-r--r--source4/include/system/passwd.h12
-rw-r--r--source4/lib/cmdline/popt_common.c1
-rw-r--r--source4/lib/module.c1
-rw-r--r--source4/lib/system.c1
-rw-r--r--source4/lib/tdb/common/tdb.c1
-rw-r--r--source4/lib/xfile.c1
-rw-r--r--source4/libcli/clifile.c1
-rw-r--r--source4/torture/locktest2.c1
-rw-r--r--source4/utils/net/net_password.c1
-rw-r--r--source4/utils/ntlm_auth.c1
15 files changed, 60 insertions, 55 deletions
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index 5e6d0209f2..e18fb311aa 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/passwd.h"
#include <mntent.h>
#include <asm/types.h>
diff --git a/source4/include/includes.h b/source4/include/includes.h
index f45665ad05..c511a5fb33 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -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);
diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h
index dc13e148e5..1ddb6b687c 100644
--- a/source4/include/system/filesys.h
+++ b/source4/include/system/filesys.h
@@ -99,6 +99,15 @@
#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 */
@@ -145,3 +154,10 @@
#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
diff --git a/source4/include/system/iconv.h b/source4/include/system/iconv.h
index c70fc6b242..bace51c029 100644
--- a/source4/include/system/iconv.h
+++ b/source4/include/system/iconv.h
@@ -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
+
diff --git a/source4/include/system/network.h b/source4/include/system/network.h
index 8b9fe0bcc5..d380245865 100644
--- a/source4/include/system/network.h
+++ b/source4/include/system/network.h
@@ -62,3 +62,19 @@
#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
+
diff --git a/source4/include/system/passwd.h b/source4/include/system/passwd.h
index ba7fc93d37..215f53d138 100644
--- a/source4/include/system/passwd.h
+++ b/source4/include/system/passwd.h
@@ -52,3 +52,15 @@
#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
+
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index 80be23d364..7d4dead4de 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "system/passwd.h"
#include "lib/cmdline/popt_common.h"
/* Handle command line options:
diff --git a/source4/lib/module.c b/source4/lib/module.c
index 58764683d5..9e568f601a 100644
--- a/source4/lib/module.c
+++ b/source4/lib/module.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "system/dir.h"
+#include "system/filesys.h"
#ifdef HAVE_DLOPEN
diff --git a/source4/lib/system.c b/source4/lib/system.c
index 906219bd91..5e106c96eb 100644
--- a/source4/lib/system.c
+++ b/source4/lib/system.c
@@ -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
diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c
index d41809c3d8..afe2ca1621 100644
--- a/source4/lib/tdb/common/tdb.c
+++ b/source4/lib/tdb/common/tdb.c
@@ -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"
diff --git a/source4/lib/xfile.c b/source4/lib/xfile.c
index 8572bd857a..856e5dd6e6 100644
--- a/source4/lib/xfile.c
+++ b/source4/lib/xfile.c
@@ -30,6 +30,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
#define XBUFSIZE BUFSIZ
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index cdb29beb2d..992d2c225d 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
#include "libcli/raw/libcliraw.h"
/****************************************************************************
diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c
index e2220a3b1f..7d729ca941 100644
--- a/source4/torture/locktest2.c
+++ b/source4/torture/locktest2.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/passwd.h"
static fstring password;
static fstring username;
diff --git a/source4/utils/net/net_password.c b/source4/utils/net/net_password.c
index 5da18d94b5..01682bd506 100644
--- a/source4/utils/net/net_password.c
+++ b/source4/utils/net/net_password.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "system/passwd.h"
/*
* Code for Changing and setting a password
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 060e590d15..787977abce 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -23,6 +23,7 @@
*/
#include "includes.h"
+#include "system/passwd.h"
#include "lib/cmdline/popt_common.h"
#include "auth/auth.h"