summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/pass_check.c1
-rw-r--r--source4/client/clitar.c1
-rw-r--r--source4/include/db_wrap.h1
-rw-r--r--source4/include/includes.h32
-rw-r--r--source4/include/system/filesys.h6
-rw-r--r--source4/include/system/iconv.h4
-rw-r--r--source4/include/system/resource.h35
-rw-r--r--source4/lib/genrand.c1
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c1
-rw-r--r--source4/lib/ldb/common/ldb_parse.c1
-rw-r--r--source4/lib/ldb/common/ldb_utf8.c1
-rw-r--r--source4/lib/ldb/include/includes.h8
-rw-r--r--source4/lib/socket/access.c1
-rw-r--r--source4/lib/tdb/tools/tdbdump.c1
-rw-r--r--source4/lib/util.c1
-rw-r--r--source4/lib/util_str.c1
-rw-r--r--source4/lib/util_unistr.c1
-rw-r--r--source4/libcli/ldap/ldap.c1
-rw-r--r--source4/libcli/ldap/ldap_ldif.c1
-rw-r--r--source4/libcli/nmblib.c1
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c1
-rw-r--r--source4/param/loadparm.c1
-rw-r--r--source4/param/params.c1
-rw-r--r--source4/torture/basic/utable.c1
-rw-r--r--source4/utils/ndrdump.c1
25 files changed, 76 insertions, 29 deletions
diff --git a/source4/auth/pass_check.c b/source4/auth/pass_check.c
index a50b370ad1..132d219490 100644
--- a/source4/auth/pass_check.c
+++ b/source4/auth/pass_check.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "system/passwd.h"
+#include "system/iconv.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/client/clitar.c b/source4/client/clitar.c
index 3746f51248..5ccb4e990d 100644
--- a/source4/client/clitar.c
+++ b/source4/client/clitar.c
@@ -38,6 +38,7 @@
#include "includes.h"
#include "clitar.h"
#include "system/time.h"
+#include "system/iconv.h"
/**
Convert list of tokens to array; dependent on above routine.
diff --git a/source4/include/db_wrap.h b/source4/include/db_wrap.h
index 50e3af68bd..6a12a1c9b2 100644
--- a/source4/include/db_wrap.h
+++ b/source4/include/db_wrap.h
@@ -20,7 +20,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
struct ldb_wrap {
struct ldb_context *ldb;
diff --git a/source4/include/includes.h b/source4/include/includes.h
index c4926ee7c5..a6a2354f67 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -73,26 +73,16 @@
#endif
#include <unistd.h>
-
#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
#include <unistd.h>
#include <stdio.h>
#include <stddef.h>
+#include <stdlib.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
#endif
-#include <stdlib.h>
-
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -119,24 +109,12 @@
#include <sys/stat.h>
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_SYS_FILIO_H
-#include <sys/filio.h>
-#endif
-
#include <signal.h>
-#ifdef HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-
#include <errno.h>
#ifdef HAVE_SYS_MODE_H
@@ -152,8 +130,6 @@
#include <varargs.h>
#endif
-#include <sys/file.h>
-
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
@@ -281,11 +257,11 @@ extern int errno;
/* Lists, trees, caching, database... */
#include "xfile.h"
#include "dlinklist.h"
+#include "talloc.h"
#include "lib/ldb/include/ldb.h"
#include "lib/tdb/include/tdb.h"
#include "lib/tdb/include/spinlock.h"
#include "lib/tdb/include/tdbutil.h"
-#include "talloc.h"
#include "db_wrap.h"
#include "nt_status.h"
#include "trans2.h"
diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h
index d99f892995..d038d8c085 100644
--- a/source4/include/system/filesys.h
+++ b/source4/include/system/filesys.h
@@ -52,3 +52,9 @@
#include <sys/statvfs.h>
#endif
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
+#include <sys/file.h>
+
diff --git a/source4/include/system/iconv.h b/source4/include/system/iconv.h
index 76b767e2e8..c70fc6b242 100644
--- a/source4/include/system/iconv.h
+++ b/source4/include/system/iconv.h
@@ -29,3 +29,7 @@
#endif
#endif
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+
diff --git a/source4/include/system/resource.h b/source4/include/system/resource.h
new file mode 100644
index 0000000000..e95448e5b7
--- /dev/null
+++ b/source4/include/system/resource.h
@@ -0,0 +1,35 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ resource system include wrappers
+
+ Copyright (C) Andrew Tridgell 2004
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
diff --git a/source4/lib/genrand.c b/source4/lib/genrand.c
index 11771b32c9..7289719791 100644
--- a/source4/lib/genrand.c
+++ b/source4/lib/genrand.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
static unsigned char hash[258];
static uint32 counter;
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index c693d211a9..01706304d9 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -37,6 +37,7 @@
*/
#include "includes.h"
+#include <ctype.h>
/*
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c
index b037284a24..feec8fc0f2 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -43,6 +43,7 @@
#include "includes.h"
#include "ldb/include/ldb_parse.h"
+#include <ctype.h>
/*
diff --git a/source4/lib/ldb/common/ldb_utf8.c b/source4/lib/ldb/common/ldb_utf8.c
index 1e467d23af..e92d318bae 100644
--- a/source4/lib/ldb/common/ldb_utf8.c
+++ b/source4/lib/ldb/common/ldb_utf8.c
@@ -33,6 +33,7 @@
*/
#include "includes.h"
+#include <ctype.h>
/*
TODO:
diff --git a/source4/lib/ldb/include/includes.h b/source4/lib/ldb/include/includes.h
index 1d3ac2a50e..44ff672266 100644
--- a/source4/lib/ldb/include/includes.h
+++ b/source4/lib/ldb/include/includes.h
@@ -28,3 +28,11 @@
#include "tdb.h"
#include "proto.h"
+#ifdef HAVE_INTPTR_T
+#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+#else
+#define discard_const(ptr) ((void *)(ptr))
+#endif
+#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
+
+
diff --git a/source4/lib/socket/access.c b/source4/lib/socket/access.c
index f5093177dd..c90bf203dd 100644
--- a/source4/lib/socket/access.c
+++ b/source4/lib/socket/access.c
@@ -33,6 +33,7 @@
#include "includes.h"
#include "system/network.h"
+#include "system/iconv.h"
#define FAIL (-1)
#define ALLONES ((uint32_t)0xFFFFFFFF)
diff --git a/source4/lib/tdb/tools/tdbdump.c b/source4/lib/tdb/tools/tdbdump.c
index 0e179f8c3e..822f65e594 100644
--- a/source4/lib/tdb/tools/tdbdump.c
+++ b/source4/lib/tdb/tools/tdbdump.c
@@ -37,6 +37,7 @@
#else
#include "includes.h"
+#include "system/iconv.h"
#endif
diff --git a/source4/lib/util.c b/source4/lib/util.c
index 7b6396fa93..2ce34f58d9 100644
--- a/source4/lib/util.c
+++ b/source4/lib/util.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "system/network.h"
+#include "system/iconv.h"
/**************************************************************************n
Find a suitable temporary directory. The result should be copied immediately
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index 95c0b84d98..9fd6dd5356 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
/**
* @file
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c
index 7d10b92c43..bd4aea7c41 100644
--- a/source4/lib/util_unistr.c
+++ b/source4/lib/util_unistr.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
/* these 2 tables define the unicode case handling. They are loaded
at startup either via mmap() or read() from the lib directory */
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 1eb7888d41..987a822219 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "system/network.h"
+#include "system/iconv.h"
/****************************************************************************
*
diff --git a/source4/libcli/ldap/ldap_ldif.c b/source4/libcli/ldap/ldap_ldif.c
index 8fe50b6d08..19f4e56e73 100644
--- a/source4/libcli/ldap/ldap_ldif.c
+++ b/source4/libcli/ldap/ldap_ldif.c
@@ -24,6 +24,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
/****************************************************************************
*
diff --git a/source4/libcli/nmblib.c b/source4/libcli/nmblib.c
index 120b937be5..06030f9aca 100644
--- a/source4/libcli/nmblib.c
+++ b/source4/libcli/nmblib.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "system/network.h"
#include "system/time.h"
+#include "system/iconv.h"
static const struct opcode_names {
const char *nmb_opcode_name;
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index f80e532762..c80e68b274 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -22,6 +22,7 @@
#include "include/includes.h"
#include "vfs_posix.h"
+#include "system/iconv.h"
/*
this mangling scheme uses the following format
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index ffc539ef18..8e6538cc12 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -54,6 +54,7 @@
#include "includes.h"
#include "system/time.h"
+#include "system/iconv.h"
#include "librpc/gen_ndr/ndr_svcctl.h"
BOOL in_client = False; /* Not in the client by default */
diff --git a/source4/param/params.c b/source4/param/params.c
index 892e5476cc..2a0cd13682 100644
--- a/source4/param/params.c
+++ b/source4/param/params.c
@@ -80,6 +80,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
/* -------------------------------------------------------------------------- **
* Constants...
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index 900f0be830..c09ef576a5 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
BOOL torture_utable(void)
{
diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c
index 22e4e6f8f6..d408433fc3 100644
--- a/source4/utils/ndrdump.c
+++ b/source4/utils/ndrdump.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/iconv.h"
static const struct dcerpc_interface_table *find_pipe(const char *pipe_name)
{