diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-02 11:42:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:20 -0500 |
commit | 6bd02aa5046b606171a680e6f8aefba31b744af1 (patch) | |
tree | 9b87ee2247f8db0d410718b26b8f34db37532af8 | |
parent | f74ea959fe88e752b876791d2a3b998a88bd9800 (diff) | |
download | samba-6bd02aa5046b606171a680e6f8aefba31b744af1.tar.gz samba-6bd02aa5046b606171a680e6f8aefba31b744af1.tar.bz2 samba-6bd02aa5046b606171a680e6f8aefba31b744af1.zip |
r3478: split out some more pieces of includes.h
(This used to be commit 8e9212ecfc61c509f686363d8ec412ce54bc1c8d)
-rw-r--r-- | source4/client/clitar.c | 1 | ||||
-rw-r--r-- | source4/include/includes.h | 79 | ||||
-rw-r--r-- | source4/include/structs.h | 8 | ||||
-rw-r--r-- | source4/include/system/filesys.h | 12 | ||||
-rw-r--r-- | source4/include/system/network.h | 9 | ||||
-rw-r--r-- | source4/include/system/passwd.h | 29 | ||||
-rw-r--r-- | source4/include/system/printing.h | 42 | ||||
-rw-r--r-- | source4/include/system/shmem.h | 4 | ||||
-rw-r--r-- | source4/include/system/terminal.h | 6 | ||||
-rw-r--r-- | source4/include/system/time.h | 4 | ||||
-rw-r--r-- | source4/include/system/wait.h | 4 | ||||
-rw-r--r-- | source4/lib/util_strlist.c | 1 | ||||
-rw-r--r-- | source4/libnet/libnet.c | 1 | ||||
-rw-r--r-- | source4/libnet/libnet_passwd.c | 1 | ||||
-rw-r--r-- | source4/libnet/libnet_rpc.c | 1 | ||||
-rw-r--r-- | source4/libnet/libnet_time.c | 1 | ||||
-rw-r--r-- | source4/param/loadparm.c | 1 | ||||
-rw-r--r-- | source4/utils/net/net.c | 1 | ||||
-rw-r--r-- | source4/utils/net/net_password.c | 2 | ||||
-rw-r--r-- | source4/utils/net/net_time.c | 2 |
20 files changed, 124 insertions, 85 deletions
diff --git a/source4/client/clitar.c b/source4/client/clitar.c index 5ccb4e990d..ca2c55bcbf 100644 --- a/source4/client/clitar.c +++ b/source4/client/clitar.c @@ -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. diff --git a/source4/include/includes.h b/source4/include/includes.h index 83f95f0a2b..78397faac6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -28,31 +28,6 @@ #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 diff --git a/source4/include/structs.h b/source4/include/structs.h index 6886c7632a..24ae2a5ba0 100644 --- a/source4/include/structs.h +++ b/source4/include/structs.h @@ -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; diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h index 07465c1c56..60d2910ba0 100644 --- a/source4/include/system/filesys.h +++ b/source4/include/system/filesys.h @@ -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 + diff --git a/source4/include/system/network.h b/source4/include/system/network.h index dfecd59090..bad4339666 100644 --- a/source4/include/system/network.h +++ b/source4/include/system/network.h @@ -81,3 +81,12 @@ #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 + diff --git a/source4/include/system/passwd.h b/source4/include/system/passwd.h index 901b1b92f2..8a5402131a 100644 --- a/source4/include/system/passwd.h +++ b/source4/include/system/passwd.h @@ -56,15 +56,32 @@ #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 index 0000000000..9eb93a776e --- /dev/null +++ b/source4/include/system/printing.h @@ -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 + diff --git a/source4/include/system/shmem.h b/source4/include/system/shmem.h index 49ab291960..e197cd146f 100644 --- a/source4/include/system/shmem.h +++ b/source4/include/system/shmem.h @@ -42,3 +42,7 @@ #endif +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif + diff --git a/source4/include/system/terminal.h b/source4/include/system/terminal.h index abc661d7ac..b727f8e7fa 100644 --- a/source4/include/system/terminal.h +++ b/source4/include/system/terminal.h @@ -20,6 +20,12 @@ 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> diff --git a/source4/include/system/time.h b/source4/include/system/time.h index 132a3e5dfc..7d27a56c9e 100644 --- a/source4/include/system/time.h +++ b/source4/include/system/time.h @@ -35,3 +35,7 @@ #include <utime.h> #endif +#ifndef HAVE_TIMEGM +time_t timegm(struct tm *tm); +#endif + diff --git a/source4/include/system/wait.h b/source4/include/system/wait.h index 6af01986f9..d4c47582ad 100644 --- a/source4/include/system/wait.h +++ b/source4/include/system/wait.h @@ -31,3 +31,7 @@ typedef int sig_atomic_t; #endif +#ifndef SIGCLD +#define SIGCLD SIGCHLD +#endif + diff --git a/source4/lib/util_strlist.c b/source4/lib/util_strlist.c index db459b2f0f..a9198031a1 100644 --- a/source4/lib/util_strlist.c +++ b/source4/lib/util_strlist.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/network.h" /** List of Strings manipulation functions diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c index 8f49d6334e..1462a63dd2 100644 --- a/source4/libnet/libnet.c +++ b/source4/libnet/libnet.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "libnet/libnet.h" struct libnet_context *libnet_context_init(void) { diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c index 8082c3c9b0..c20a7733a3 100644 --- a/source4/libnet/libnet_passwd.c +++ b/source4/libnet/libnet_passwd.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "libnet/libnet.h" #include "librpc/gen_ndr/ndr_samr.h" #include "lib/crypto/crypto.h" diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index 48a7f96774..b4b33bf4c0 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -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) diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index fefddce39b..b0d304ffcc 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "libnet/libnet.h" #include "librpc/gen_ndr/ndr_srvsvc.h" #include "system/time.h" diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 48c33a1cca..37595c7a4f 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -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" diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c index 5a4ececa5b..3409101b71 100644 --- a/source4/utils/net/net.c +++ b/source4/utils/net/net.c @@ -42,6 +42,7 @@ /*****************************************************/ #include "includes.h" +#include "utils/net/net.h" #include "lib/cmdline/popt_common.h" /* diff --git a/source4/utils/net/net_password.c b/source4/utils/net/net_password.c index 01682bd506..14b48e301e 100644 --- a/source4/utils/net/net_password.c +++ b/source4/utils/net/net_password.c @@ -20,6 +20,8 @@ */ #include "includes.h" +#include "utils/net/net.h" +#include "libnet/libnet.h" #include "system/passwd.h" /* diff --git a/source4/utils/net/net_time.c b/source4/utils/net/net_time.c index e32ec76293..7668a42b8c 100644 --- a/source4/utils/net/net_time.c +++ b/source4/utils/net/net_time.c @@ -20,6 +20,8 @@ */ #include "includes.h" +#include "libnet/libnet.h" +#include "utils/net/net.h" #include "system/time.h" /* |