r3478: split out some more pieces of includes.h
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Nov 2004 11:42:35 +0000 (11:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:20 +0000 (13:05 -0500)
(This used to be commit 8e9212ecfc61c509f686363d8ec412ce54bc1c8d)

20 files changed:
source4/client/clitar.c
source4/include/includes.h
source4/include/structs.h
source4/include/system/filesys.h
source4/include/system/network.h
source4/include/system/passwd.h
source4/include/system/printing.h [new file with mode: 0644]
source4/include/system/shmem.h
source4/include/system/terminal.h
source4/include/system/time.h
source4/include/system/wait.h
source4/lib/util_strlist.c
source4/libnet/libnet.c
source4/libnet/libnet_passwd.c
source4/libnet/libnet_rpc.c
source4/libnet/libnet_time.c
source4/param/loadparm.c
source4/utils/net/net.c
source4/utils/net/net_password.c
source4/utils/net/net_time.c

index 5ccb4e990d37b629414c8aebc45cd69b1ed61fdf..ca2c55bcbfd782d0e3ae172b9dd3d4285c825129 100644 (file)
@@ -39,6 +39,7 @@
 #include "clitar.h"
 #include "system/time.h"
 #include "system/iconv.h"
+#include "system/filesys.h"
 
 /**
  Convert list of tokens to array; dependent on above routine.
index 83f95f0a2b62de65244aaed4bd9ef699dd3a74be..78397faac65cd699ab5b69e3c940d4e02ca0b198 100644 (file)
 
 #include "local.h"
 
-#ifdef AIX
-#define DEFAULT_PRINTING PRINT_AIX
-#define PRINTCAP_NAME "/etc/qconfig"
-#endif
-
-#ifdef HPUX
-#define DEFAULT_PRINTING PRINT_HPUX
-#endif
-
-#ifdef QNX
-#define DEFAULT_PRINTING PRINT_QNX
-#endif
-
-#ifdef SUNOS4
-/* on SUNOS4 termios.h conflicts with sys/ioctl.h */
-#undef HAVE_TERMIOS_H
-#endif
-
-#ifndef DEFAULT_PRINTING
-#define DEFAULT_PRINTING PRINT_BSD
-#endif
-#ifndef PRINTCAP_NAME
-#define PRINTCAP_NAME "/etc/printcap"
-#endif
-
 #if (__GNUC__ >= 3)
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
@@ -215,8 +190,6 @@ extern int errno;
 #include "structs.h"
 #include "ntvfs/ntvfs.h"
 #include "cli_context.h"
-#include "libnet/libnet.h"
-#include "utils/net/net.h"
 #include "nsswitch/winbind_client.h"
 
 #define malloc_p(type) (type *)malloc(sizeof(type))
@@ -245,54 +218,10 @@ typedef int (*comparison_fn_t)(const void *, const void *);
 #define QSORT_CAST (int (*)(const void *, const void *))
 #endif
 
-#ifndef SIGCLD
-#define SIGCLD SIGCHLD
-#endif
-
-#ifndef MAP_FILE
-#define MAP_FILE 0
-#endif
-
-#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
-#define OSF1_ENH_SEC 1
-#endif
-
-#ifndef ALLOW_CHANGE_PASSWORD
-#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
-#define ALLOW_CHANGE_PASSWORD 1
-#endif
-#endif
-
-/* what is the longest significant password available on your system? 
- Knowing this speeds up password searches a lot */
-#ifndef PASSWORD_LENGTH
-#define PASSWORD_LENGTH 8
-#endif
-
 #ifndef HAVE_PIPE
 #define SYNC_DNS 1
 #endif
 
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 256
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK 0x7f000001
-#endif
-
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
-
-#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
-#define ULTRIX_AUTH 1
-#endif
-
 #ifndef HAVE_STRDUP
 char *strdup(const char *s);
 #endif
@@ -313,10 +242,6 @@ size_t strlcpy(char *d, const char *s, size_t bufsize);
 size_t strlcat(char *d, const char *s, size_t bufsize);
 #endif
 
-#ifndef HAVE_FTRUNCATE
-int ftruncate(int f,long l);
-#endif
-
 #ifndef HAVE_STRNDUP
 char *strndup(const char *s, size_t n);
 #endif
@@ -364,10 +289,6 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
 #define VA_COPY(dest, src) (dest) = (src)
 #endif
 
-#ifndef HAVE_TIMEGM
-time_t timegm(struct tm *tm);
-#endif
-
 #if defined(VALGRIND)
 #define strlen(x) valgrind_strlen(x)
 #endif
index 6886c7632afe6c8097e0f7a9d630eab99b385bcc..24ae2a5ba0cb03438f2062061f643593bef0be36 100644 (file)
@@ -98,3 +98,11 @@ struct dcesrv_connection;
 struct dcesrv_endpoint;
 struct dcesrv_call_state;
 struct dcesrv_auth;
+
+union libnet_ChangePassword;
+union libnet_SetPassword;
+union libnet_find_pdc;
+union libnet_rpc_connect;
+union libnet_RemoteTOD;
+struct net_functable;
+struct net_context;
index 07465c1c56cb2b33c4fbabe16eae0823d3fcf491..60d2910ba04e026f842b7130c6ff199545ff4f3e 100644 (file)
@@ -180,3 +180,15 @@ int rename(const char *zfrom, const char *zto);
 #define UINT16_MAX 65535
 #endif
 
+#ifndef HAVE_FTRUNCATE
+int ftruncate(int f,long l);
+#endif
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 256
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
index dfecd59090d4004528b186456a39f6d79ad0f4db..bad4339666fcac85e433a7f4fe8107188c124f30 100644 (file)
 #ifndef HAVE_SOCKLEN_T_TYPE
 typedef int socklen_t;
 #endif
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK 0x7f000001
+#endif
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
index 901b1b92f2309963c50e1a9f15d93efdf5e17bc1..8a5402131a916ef5ad3c6364b60fd9812e919972 100644 (file)
 #define getpass(prompt) getsmbpass((prompt))
 #endif
 
-#ifndef HAVE_INITGROUPS
-int initgroups(char *name,gid_t id);
+#ifndef NGROUPS_MAX
+#define NGROUPS_MAX 32 /* Guess... */
 #endif
 
-#ifndef HAVE_CRYPT
-#define crypt ufc_crypt
+/* what is the longest significant password available on your system? 
+ Knowing this speeds up password searches a lot */
+#ifndef PASSWORD_LENGTH
+#define PASSWORD_LENGTH 8
 #endif
 
+#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
+#define OSF1_ENH_SEC 1
+#endif
 
-#ifndef NGROUPS_MAX
-#define NGROUPS_MAX 32 /* Guess... */
+#ifndef ALLOW_CHANGE_PASSWORD
+#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
+#define ALLOW_CHANGE_PASSWORD 1
+#endif
 #endif
+
+#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
+#define ULTRIX_AUTH 1
+#endif
+
+
+#ifndef HAVE_INITGROUPS
+int initgroups(char *name,gid_t id);
+#endif
+
diff --git a/source4/include/system/printing.h b/source4/include/system/printing.h
new file mode 100644 (file)
index 0000000..9eb93a7
--- /dev/null
@@ -0,0 +1,42 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   printing 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 AIX
+#define DEFAULT_PRINTING PRINT_AIX
+#define PRINTCAP_NAME "/etc/qconfig"
+#endif
+
+#ifdef HPUX
+#define DEFAULT_PRINTING PRINT_HPUX
+#endif
+
+#ifdef QNX
+#define DEFAULT_PRINTING PRINT_QNX
+#endif
+
+#ifndef DEFAULT_PRINTING
+#define DEFAULT_PRINTING PRINT_BSD
+#endif
+#ifndef PRINTCAP_NAME
+#define PRINTCAP_NAME "/etc/printcap"
+#endif
+
index 49ab2919605041c640f324e557d8f02110dbfad9..e197cd146f1369e57830761cbdc584bfdc151099 100644 (file)
@@ -42,3 +42,7 @@
 #endif
 
 
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif
+
index abc661d7acb570729f3d121317a0ad821348b247..b727f8e7fa386d99d3fa0bb402ae179273fc3d32 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#ifdef SUNOS4
+/* on SUNOS4 termios.h conflicts with sys/ioctl.h */
+#undef HAVE_TERMIOS_H
+#endif
+
+
 #if defined(HAVE_TERMIOS_H)
 /* POSIX terminal handling. */
 #include <termios.h>
index 132a3e5dfca343290a8b9f4ff936a5b44bba0102..7d27a56c9ed2b0cd8e3a693b4a91e65f6163243e 100644 (file)
@@ -35,3 +35,7 @@
 #include <utime.h>
 #endif
 
+#ifndef HAVE_TIMEGM
+time_t timegm(struct tm *tm);
+#endif
+
index 6af01986f9279d2761432efe0267be1c00ca5b57..d4c47582ad61cfa65e28abecd6e26e3bb8ba2192 100644 (file)
@@ -31,3 +31,7 @@
 typedef int sig_atomic_t;
 #endif
 
+#ifndef SIGCLD
+#define SIGCLD SIGCHLD
+#endif
+
index db459b2f0fc9d5e825c16b7b846fc29d530ccad9..a9198031a1af4c4d729c4dac9c78a1fbecba534f 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "system/network.h"
 
 /**
  List of Strings manipulation functions
index 8f49d6334e4e06b0306d6b385d9d10734ddec674..1462a63dd2a4ca66d7ce205cb4d7b0c86d90024a 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "libnet/libnet.h"
 
 struct libnet_context *libnet_context_init(void)
 {
index 8082c3c9b022a58bc0db615fc704d78625f20b29..c20a7733a3b7a81b66bd629e57d41de8c91e5c3a 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "libnet/libnet.h"
 #include "librpc/gen_ndr/ndr_samr.h"
 #include "lib/crypto/crypto.h"
 
index 48a7f9677491031d2468364f3cb954c803b730cd..b4b33bf4c0b93efa18ae7cbee349b26928e54cb9 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "libnet/libnet.h"
 
 /* find a domain pdc generic */
 static NTSTATUS libnet_find_pdc_generic(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, union libnet_find_pdc *r)
index fefddce39b492376166ee80d31c2d5a95f296da5..b0d304ffcc5ca3cf430bd0c70f41bc3ff9e47def 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "libnet/libnet.h"
 #include "librpc/gen_ndr/ndr_srvsvc.h"
 #include "system/time.h"
 
index 48c33a1cca0112f86d65c192d7d94cbaccde28bc..37595c7a4f1cac33583a7b7d1c9b20d2dffbb958 100644 (file)
@@ -56,6 +56,7 @@
 #include "system/time.h"
 #include "system/iconv.h"
 #include "system/network.h"
+#include "system/printing.h"
 #include "librpc/gen_ndr/ndr_svcctl.h"
 #include "include/dlinklist.h"
 
index 5a4ececa5be38d3c194d052018489b51df894800..3409101b7138a950e6bd43f585ad358ed0befa8a 100644 (file)
@@ -42,6 +42,7 @@
 /*****************************************************/
 
 #include "includes.h"
+#include "utils/net/net.h"
 #include "lib/cmdline/popt_common.h"
 
 /*
index 01682bd506e2c144fffbd45ec5776f46820b1707..14b48e301eff8437845958d17a083983de696a04 100644 (file)
@@ -20,6 +20,8 @@
 */
 
 #include "includes.h"
+#include "utils/net/net.h"
+#include "libnet/libnet.h"
 #include "system/passwd.h"
 
 /*
index e32ec76293a64ce64c44767662e5995e577fe631..7668a42b8ca514ac4041627c835b469ebf1b3c3f 100644 (file)
@@ -20,6 +20,8 @@
 */
 
 #include "includes.h"
+#include "libnet/libnet.h"
+#include "utils/net/net.h"
 #include "system/time.h"
 
 /*