r3449: more include file reduction
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Nov 2004 01:42:45 +0000 (01:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:13 +0000 (13:05 -0500)
the ldb part isn't ideal, I will have to think of a better solution
(This used to be commit 6b1f86aea8427a8e957b1aeb0ec2f507297f07cb)

25 files changed:
source4/auth/pass_check.c
source4/client/clitar.c
source4/include/db_wrap.h
source4/include/includes.h
source4/include/system/filesys.h
source4/include/system/iconv.h
source4/include/system/resource.h [new file with mode: 0644]
source4/lib/genrand.c
source4/lib/ldb/common/ldb_ldif.c
source4/lib/ldb/common/ldb_parse.c
source4/lib/ldb/common/ldb_utf8.c
source4/lib/ldb/include/includes.h
source4/lib/socket/access.c
source4/lib/tdb/tools/tdbdump.c
source4/lib/util.c
source4/lib/util_str.c
source4/lib/util_unistr.c
source4/libcli/ldap/ldap.c
source4/libcli/ldap/ldap_ldif.c
source4/libcli/nmblib.c
source4/ntvfs/posix/pvfs_shortname.c
source4/param/loadparm.c
source4/param/params.c
source4/torture/basic/utable.c
source4/utils/ndrdump.c

index a50b370ad1ab6f598a1013c355f147516b518447..132d21949031865f250ac0510f1c0d913223470d 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "system/passwd.h"
+#include "system/iconv.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index 3746f51248f4fe2833291b8130741308b1b4c4b6..5ccb4e990d37b629414c8aebc45cd69b1ed61fdf 100644 (file)
@@ -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.
index 50e3af68bd1118ab891254a7549513de7400fab4..6a12a1c9b282b98d63afde8dd82dd6a37ac67ce8 100644 (file)
@@ -20,7 +20,6 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-
 struct ldb_wrap {
        struct ldb_context *ldb;
 
index c4926ee7c5ee961331c36df65b397399c242ef6e..a6a2354f670d16155ecb7b2f8a268ef85f0c0218 100644 (file)
 #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
 
 #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
 #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"
index d99f89299521848ad9cf157c0c6ba2b34d3bc8a1..d038d8c08558added85c4f988ebb5f9953d0c848 100644 (file)
@@ -52,3 +52,9 @@
 #include <sys/statvfs.h>
 #endif
 
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
+#include <sys/file.h>
+
index 76b767e2e824cb3f08dcc0fe59e6c3b5758ef188..c70fc6b242a3602283d1cda3eaa4a00414605866 100644 (file)
@@ -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 (file)
index 0000000..e95448e
--- /dev/null
@@ -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
+
index 11771b32c94dbd4bf56e4f07ac733027313af939..72897197918ed48c914061ec37b60d6115f01050 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "system/iconv.h"
 
 static unsigned char hash[258];
 static uint32 counter;
index c693d211a91c191122540f0d9816a9392aeafaec..01706304d93e109bea577829b350c338f568ea3d 100644 (file)
@@ -37,6 +37,7 @@
 */
 
 #include "includes.h"
+#include <ctype.h>
 
 
 /*
index b037284a246a61664cb9e49279e403c093c72c18..feec8fc0f22aa6269dd39f44412b142f9f15915e 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "includes.h"
 #include "ldb/include/ldb_parse.h"
+#include <ctype.h>
 
 
 /*
index 1e467d23afc3030082797d42eed71b75923766b2..e92d318bae7c156580a017de7f9bb4022d2c572d 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 #include "includes.h"
+#include <ctype.h>
 
 /*
   TODO:
index 1d3ac2a50e8e118d4d1c32d7335cd8a0aad78f8d..44ff672266e9c28e41d967bda2329a30e27d23a1 100644 (file)
 #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))
+
+
index f5093177ddd486d63bdb74d68837ba254b69011d..c90bf203ddb5b219e162229cf704c141021c8cd5 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "includes.h"
 #include "system/network.h"
+#include "system/iconv.h"
 
 #define        FAIL            (-1)
 #define ALLONES  ((uint32_t)0xFFFFFFFF)
index 0e179f8c3ea1554121fb13f285ab73a2986476b1..822f65e5943820be36528a1026917a465d3c8d4b 100644 (file)
@@ -37,6 +37,7 @@
 #else
 
 #include "includes.h"
+#include "system/iconv.h"
 
 #endif
 
index 7b6396fa9322533e1d150c863545fe91d10bf840..2ce34f58d99f0bb3355787f90435d16d1456957e 100644 (file)
@@ -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
index 95c0b84d98050cd17cc8137e27b77e9f24805917..9fd6dd53560f65e2a641037f6f8780440bd31783 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "system/iconv.h"
 
 /**
  * @file
index 7d10b92c4303a0de37b052433781fb3b4670f623..bd4aea7c4100412ef8af59e53d1d030aa0301d5c 100644 (file)
@@ -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 */
index 1eb7888d4131071483d4057f0358c6379868c4c2..987a8222195ba69a34a7328ddca64d32c0f064c8 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "includes.h"
 #include "system/network.h"
+#include "system/iconv.h"
 
 /****************************************************************************
  *
index 8fe50b6d0846082d9e1a82d12fb56d012d5904c2..19f4e56e7371f97cb6faebb2340d1fd5baa0d7ff 100644 (file)
@@ -24,6 +24,7 @@
 */
 
 #include "includes.h"
+#include "system/iconv.h"
 
 /****************************************************************************
  *
index 120b937be55506e9c40f3a3497d0805dc7027e34..06030f9aca16d1b7a7eea0744ce304f5f6a7282b 100644 (file)
@@ -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;
index f80e5327625d44c957c6e1b408086e54949edb27..c80e68b274fa37b476fa6fadc6b034b852a2f8f5 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "include/includes.h"
 #include "vfs_posix.h"
+#include "system/iconv.h"
 
 /*
   this mangling scheme uses the following format
index ffc539ef185c15cef54d9d652f61d8d65b38cca5..8e6538cc12525de49908cf55358a3e7de63def6a 100644 (file)
@@ -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 */
index 892e5476cc035299a5e39744b3f172a15ee8c67e..2a0cd13682fa5e1385351444a0490812ed9fc32a 100644 (file)
@@ -80,6 +80,7 @@
  */
 
 #include "includes.h"
+#include "system/iconv.h"
 
 /* -------------------------------------------------------------------------- **
  * Constants...
index 900f0be830467eaee70c4dea1005d8e8d35a8d34..c09ef576a53ebafc957e9e2f69cf3a037d777b83 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "system/iconv.h"
 
 BOOL torture_utable(void)
 {
index 22e4e6f8f6fd7df190b3a937824732b74a633eeb..d408433fc3908f3762cc283978ed4a8134313de6 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "system/iconv.h"
 
 static const struct dcerpc_interface_table *find_pipe(const char *pipe_name)
 {