diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-02 00:24:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:12 -0500 |
commit | ead3508ac81ff3ed2a48753f3b5e23537ba6ec73 (patch) | |
tree | 5bf293783de7fbc138ee206749ab02bf18415ea1 /source4 | |
parent | 28785364baec1fbbf66de9ca38f397d7cc5c2c67 (diff) | |
download | samba-ead3508ac81ff3ed2a48753f3b5e23537ba6ec73.tar.gz samba-ead3508ac81ff3ed2a48753f3b5e23537ba6ec73.tar.bz2 samba-ead3508ac81ff3ed2a48753f3b5e23537ba6ec73.zip |
r3447: more include/system/XXX.h include files
(This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105)
Diffstat (limited to 'source4')
71 files changed, 408 insertions, 156 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c index 1530165eb1..5aff1d07e6 100644 --- a/source4/auth/auth_sam.c +++ b/source4/auth/auth_sam.c @@ -21,6 +21,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_samr.h" +#include "system/time.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH diff --git a/source4/auth/pass_check.c b/source4/auth/pass_check.c index 34faa5e03a..a50b370ad1 100644 --- a/source4/auth/pass_check.c +++ b/source4/auth/pass_check.c @@ -22,6 +22,7 @@ password database. The SMB encrypted password support is elsewhere */ #include "includes.h" +#include "system/passwd.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH diff --git a/source4/client/client.c b/source4/client/client.c index 4dd149796d..4a7f0dd258 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -24,6 +24,8 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_srvsvc.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" +#include "system/dir.h" #ifndef REGISTER #define REGISTER 0 diff --git a/source4/client/clitar.c b/source4/client/clitar.c index 7c19204e74..3746f51248 100644 --- a/source4/client/clitar.c +++ b/source4/client/clitar.c @@ -37,6 +37,7 @@ #include "includes.h" #include "clitar.h" +#include "system/time.h" /** Convert list of tokens to array; dependent on above routine. diff --git a/source4/include/includes.h b/source4/include/includes.h index 914ec2f4ea..24319cad06 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -72,37 +72,18 @@ /** Feel free to add definitions for other compilers here. */ #endif -#ifdef RELIANTUNIX -/* - * <unistd.h> has to be included before any other to get - * large file support on Reliant UNIX. Yes, it's broken :-). - */ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#endif /* RELIANTUNIX */ #include <sys/types.h> #include <stdint.h> -#ifdef TIME_WITH_SYS_TIME -#include <sys/time.h> -#include <time.h> -#else -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#else -#include <time.h> -#endif -#endif - #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> #endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include <stdio.h> #include <stddef.h> @@ -115,12 +96,6 @@ #include <stdlib.h> #endif -#ifdef HAVE_SYS_SYSCALL_H -#include <sys/syscall.h> -#elif HAVE_SYSCALL_H -#include <syscall.h> -#endif - #ifdef HAVE_STRING_H #include <string.h> #endif @@ -164,26 +139,9 @@ #ifdef HAVE_CTYPE_H #include <ctype.h> #endif -#ifdef HAVE_GRP_H -#include <grp.h> -#endif -#ifdef HAVE_SYS_PRIV_H -#include <sys/priv.h> -#endif -#ifdef HAVE_SYS_ID_H -#include <sys/id.h> -#endif #include <errno.h> -#ifdef HAVE_UTIME_H -#include <utime.h> -#endif - -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> -#endif - #ifdef HAVE_SYS_MODE_H /* apparently AIX needs this for S_ISLNK */ #ifndef S_ISLNK @@ -191,132 +149,18 @@ #endif #endif -#ifdef HAVE_GLOB_H -#include <glob.h> -#endif - -#include <pwd.h> - #ifdef HAVE_STDARG_H #include <stdarg.h> #else #include <varargs.h> #endif -#ifdef HAVE_SYSLOG_H -#include <syslog.h> -#else -#ifdef HAVE_SYS_SYSLOG_H -#include <sys/syslog.h> -#endif -#endif - #include <sys/file.h> -#if defined(HAVE_TERMIOS_H) -/* POSIX terminal handling. */ -#include <termios.h> -#elif defined(HAVE_TERMIO_H) -/* Older SYSV terminal handling - don't use if we can avoid it. */ -#include <termio.h> -#elif defined(HAVE_SYS_TERMIO_H) -/* Older SYSV terminal handling - don't use if we can avoid it. */ -#include <sys/termio.h> -#endif - -#if HAVE_DIRENT_H -# include <dirent.h> -# define NAMLEN(dirent) strlen((dirent)->d_name) -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H -# include <sys/ndir.h> -# endif -# if HAVE_SYS_DIR_H -# include <sys/dir.h> -# endif -# if HAVE_NDIR_H -# include <ndir.h> -# endif -#endif - -#ifdef HAVE_SYS_MMAN_H -#include <sys/mman.h> -#endif - -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif - -#ifdef HAVE_SYS_VFS_H -#include <sys/vfs.h> -#endif - -#ifdef HAVE_SYS_ACL_H -#include <sys/acl.h> -#endif - -#ifdef HAVE_SYS_FS_S5PARAM_H -#include <sys/fs/s5param.h> -#endif - -#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY) -#include <sys/filsys.h> -#endif - -#ifdef HAVE_SYS_STATFS_H -# include <sys/statfs.h> -#endif - -#ifdef HAVE_DUSTAT_H -#include <sys/dustat.h> -#endif - -#ifdef HAVE_SYS_STATVFS_H -#include <sys/statvfs.h> -#endif - -#ifdef HAVE_SHADOW_H -#include <shadow.h> -#endif - -#ifdef HAVE_GETPWANAM -#include <sys/label.h> -#include <sys/audit.h> -#include <pwdadj.h> -#endif - -#ifdef HAVE_SYS_SECURITY_H -#include <sys/security.h> -#include <prot.h> -#define PASSWORD_LENGTH 16 -#endif /* HAVE_SYS_SECURITY_H */ - -#ifdef HAVE_COMPAT_H -#include <compat.h> -#endif - #ifdef HAVE_STROPTS_H #include <stropts.h> #endif -#ifdef HAVE_SYS_CAPABILITY_H - -#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) -#define _I386_STATFS_H -#define BROKEN_REDHAT_7_STATFS_WORKAROUND -#endif - -#include <sys/capability.h> - -#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND -#undef _I386_STATFS_H -#undef BROKEN_REDHAT_7_STATFS_WORKAROUND -#endif - -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS diff --git a/source4/include/structs.h b/source4/include/structs.h index e1e6de5d77..428495ef13 100644 --- a/source4/include/structs.h +++ b/source4/include/structs.h @@ -49,3 +49,6 @@ struct netr_SamInfo3; struct netr_Authenticator; struct iface_struct; + +struct tm; +struct utimbuf; diff --git a/source4/include/system/capability.h b/source4/include/system/capability.h new file mode 100644 index 0000000000..5a5bc93aa3 --- /dev/null +++ b/source4/include/system/capability.h @@ -0,0 +1,38 @@ +/* + Unix SMB/CIFS implementation. + + capability 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_CAPABILITY_H + +#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) +#define _I386_STATFS_H +#define BROKEN_REDHAT_7_STATFS_WORKAROUND +#endif + +#include <sys/capability.h> + +#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _I386_STATFS_H +#undef BROKEN_REDHAT_7_STATFS_WORKAROUND +#endif + +#endif + diff --git a/source4/include/system/dir.h b/source4/include/system/dir.h new file mode 100644 index 0000000000..14c0ba4f19 --- /dev/null +++ b/source4/include/system/dir.h @@ -0,0 +1,39 @@ +/* + Unix SMB/CIFS implementation. + + directory 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. +*/ + +#if HAVE_DIRENT_H +# include <dirent.h> +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include <sys/ndir.h> +# endif +# if HAVE_SYS_DIR_H +# include <sys/dir.h> +# endif +# if HAVE_NDIR_H +# include <ndir.h> +# endif +#endif + diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h new file mode 100644 index 0000000000..d99f892995 --- /dev/null +++ b/source4/include/system/filesys.h @@ -0,0 +1,54 @@ +/* + Unix SMB/CIFS implementation. + + filesystem 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_MOUNT_H +#include <sys/mount.h> +#endif + +#ifdef HAVE_SYS_VFS_H +#include <sys/vfs.h> +#endif + +#ifdef HAVE_SYS_ACL_H +#include <sys/acl.h> +#endif + +#ifdef HAVE_SYS_FS_S5PARAM_H +#include <sys/fs/s5param.h> +#endif + +#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY) +#include <sys/filsys.h> +#endif + +#ifdef HAVE_SYS_STATFS_H +# include <sys/statfs.h> +#endif + +#ifdef HAVE_DUSTAT_H +#include <sys/dustat.h> +#endif + +#ifdef HAVE_SYS_STATVFS_H +#include <sys/statvfs.h> +#endif + diff --git a/source4/include/system/glob.h b/source4/include/system/glob.h new file mode 100644 index 0000000000..fc56a18b9a --- /dev/null +++ b/source4/include/system/glob.h @@ -0,0 +1,26 @@ +/* + Unix SMB/CIFS implementation. + + glob 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_GLOB_H +#include <glob.h> +#endif + diff --git a/source4/include/system/passwd.h b/source4/include/system/passwd.h new file mode 100644 index 0000000000..ba7fc93d37 --- /dev/null +++ b/source4/include/system/passwd.h @@ -0,0 +1,54 @@ +/* + Unix SMB/CIFS implementation. + + passwd 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. +*/ + +#include <pwd.h> + +#ifdef HAVE_GRP_H +#include <grp.h> +#endif +#ifdef HAVE_SYS_PRIV_H +#include <sys/priv.h> +#endif +#ifdef HAVE_SYS_ID_H +#include <sys/id.h> +#endif + +#ifdef HAVE_SHADOW_H +#include <shadow.h> +#endif + +#ifdef HAVE_SYS_SECURITY_H +#include <sys/security.h> +#include <prot.h> +#define PASSWORD_LENGTH 16 +#endif /* HAVE_SYS_SECURITY_H */ + +#ifdef HAVE_GETPWANAM +#include <sys/label.h> +#include <sys/audit.h> +#include <pwdadj.h> +#endif + +#ifdef HAVE_COMPAT_H +#include <compat.h> +#endif + diff --git a/source4/include/system/select.h b/source4/include/system/select.h new file mode 100644 index 0000000000..0d8a5057e5 --- /dev/null +++ b/source4/include/system/select.h @@ -0,0 +1,26 @@ +/* + Unix SMB/CIFS implementation. + + select 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_SELECT_H +#include <sys/select.h> +#endif + diff --git a/source4/include/system/shmem.h b/source4/include/system/shmem.h index 57b47dd879..49ab291960 100644 --- a/source4/include/system/shmem.h +++ b/source4/include/system/shmem.h @@ -28,6 +28,10 @@ #include <sys/shm.h> #endif /* HAVE_SYS_SHM_H */ +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + /* NetBSD doesn't have these */ #ifndef SHM_R #define SHM_R 0400 @@ -37,3 +41,4 @@ #define SHM_W 0200 #endif + diff --git a/source4/include/system/syslog.h b/source4/include/system/syslog.h new file mode 100644 index 0000000000..7fcb87784b --- /dev/null +++ b/source4/include/system/syslog.h @@ -0,0 +1,30 @@ +/* + Unix SMB/CIFS implementation. + + syslog 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_SYSLOG_H +#include <syslog.h> +#else +#ifdef HAVE_SYS_SYSLOG_H +#include <sys/syslog.h> +#endif +#endif + diff --git a/source4/include/system/terminal.h b/source4/include/system/terminal.h new file mode 100644 index 0000000000..abc661d7ac --- /dev/null +++ b/source4/include/system/terminal.h @@ -0,0 +1,33 @@ +/* + Unix SMB/CIFS implementation. + + terminal 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. +*/ + +#if defined(HAVE_TERMIOS_H) +/* POSIX terminal handling. */ +#include <termios.h> +#elif defined(HAVE_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include <termio.h> +#elif defined(HAVE_SYS_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include <sys/termio.h> +#endif + diff --git a/source4/include/system/time.h b/source4/include/system/time.h new file mode 100644 index 0000000000..132a3e5dfc --- /dev/null +++ b/source4/include/system/time.h @@ -0,0 +1,37 @@ +/* + Unix SMB/CIFS implementation. + + time 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 TIME_WITH_SYS_TIME +#include <sys/time.h> +#include <time.h> +#else +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + +#ifdef HAVE_UTIME_H +#include <utime.h> +#endif + diff --git a/source4/intl/lang_tdb.c b/source4/intl/lang_tdb.c index 05e3a7ba63..a70faa0d75 100644 --- a/source4/intl/lang_tdb.c +++ b/source4/intl/lang_tdb.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/time.h" static TDB_CONTEXT *tdb; diff --git a/source4/ldap_server/ldap_rootdse.c b/source4/ldap_server/ldap_rootdse.c index f7457f4505..4bbbdad71f 100644 --- a/source4/ldap_server/ldap_rootdse.c +++ b/source4/ldap_server/ldap_rootdse.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/time.h" #define ATTR_BLOB_CONST(val) data_blob_talloc(mem_ctx, val, sizeof(val)-1) #define ATTR_SINGLE_NOVAL(ctx, attr, blob, num, nam) do { \ diff --git a/source4/lib/events.c b/source4/lib/events.c index dac23ec6bc..276b3d08e9 100644 --- a/source4/lib/events.c +++ b/source4/lib/events.c @@ -65,6 +65,8 @@ */ #include "includes.h" +#include "system/time.h" +#include "system/select.h" /* create a event_context structure. This must be the first events diff --git a/source4/lib/fsusage.c b/source4/lib/fsusage.c index bff6fdda03..f817672544 100644 --- a/source4/lib/fsusage.c +++ b/source4/lib/fsusage.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/filesys.h" /* Return the number of TOSIZE-byte blocks used by diff --git a/source4/lib/gencache.c b/source4/lib/gencache.c index a176dc5ae8..f32db598f8 100644 --- a/source4/lib/gencache.c +++ b/source4/lib/gencache.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "system/time.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_TDB diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 125089ac62..a2316919cb 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/time.h" /* change the message version with any incompatible changes in the protocol */ #define MESSAGING_VERSION 1 diff --git a/source4/lib/module.c b/source4/lib/module.c index 67fb830e6f..58764683d5 100644 --- a/source4/lib/module.c +++ b/source4/lib/module.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "system/dir.h" #ifdef HAVE_DLOPEN diff --git a/source4/lib/registry/reg_backend_dir/reg_backend_dir.c b/source4/lib/registry/reg_backend_dir/reg_backend_dir.c index 95d4c47af0..2273a86771 100644 --- a/source4/lib/registry/reg_backend_dir/reg_backend_dir.c +++ b/source4/lib/registry/reg_backend_dir/reg_backend_dir.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/dir.h" static WERROR reg_dir_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, uint32_t access_mask, SEC_DESC *desc, struct registry_key **result) { diff --git a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c index 805f95fca1..a8d1752070 100644 --- a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c +++ b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c @@ -304,6 +304,7 @@ Hope this helps.... (Although it was "fun" for me to uncover this things, *************************************************************************/ #include "includes.h" +#include "system/shmem.h" #define REG_KEY_LIST_SIZE 10 #define FLAG_HAS_NAME 0x01 diff --git a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c index c285dac7c9..448af66eec 100644 --- a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c +++ b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "includes.h" +#include "system/shmem.h" /** * The registry starts with a header that contains pointers to diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index db7af9d5b6..8449446c86 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "system/time.h" /* * ck/cd - change key diff --git a/source4/lib/replace.c b/source4/lib/replace.c index c2180a168f..60faa473b6 100644 --- a/source4/lib/replace.c +++ b/source4/lib/replace.c @@ -20,6 +20,7 @@ #include "includes.h" #include "system/wait.h" +#include "system/time.h" void replace_dummy(void); void replace_dummy(void) {} diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c index 67d9f9903d..d41809c3d8 100644 --- a/source4/lib/tdb/common/tdb.c +++ b/source4/lib/tdb/common/tdb.c @@ -66,6 +66,8 @@ #include "spinlock.h" #else #include "includes.h" +#include "system/time.h" +#include "system/shmem.h" #endif #define TDB_MAGIC_FOOD "TDB file\n" diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c index 95eb71281c..6471aec3ad 100644 --- a/source4/lib/tdb/tools/tdbtorture.c +++ b/source4/lib/tdb/tools/tdbtorture.c @@ -21,6 +21,7 @@ #else #include "includes.h" +#include "system/time.h" #endif diff --git a/source4/lib/time.c b/source4/lib/time.c index 5ea9b46844..cfceebf9cb 100644 --- a/source4/lib/time.c +++ b/source4/lib/time.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/time.h" #ifndef TIME_T_MIN #define TIME_T_MIN 0 diff --git a/source4/lib/util_file.c b/source4/lib/util_file.c index 0093de9517..1dbaf1147e 100644 --- a/source4/lib/util_file.c +++ b/source4/lib/util_file.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/shmem.h" /************************************************************************* gets a line out of a file. diff --git a/source4/lib/wins_srv.c b/source4/lib/wins_srv.c index d8be9e61d6..c9a5549cdc 100644 --- a/source4/lib/wins_srv.c +++ b/source4/lib/wins_srv.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/time.h" /* This is pretty much a complete rewrite of the earlier code. The main diff --git a/source4/libcli/auth/credentials.c b/source4/libcli/auth/credentials.c index 60feee7884..f3f8324005 100644 --- a/source4/libcli/auth/credentials.c +++ b/source4/libcli/auth/credentials.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "system/time.h" /* initialise the credentials state for old-style 64 bit session keys diff --git a/source4/libcli/namecache.c b/source4/libcli/namecache.c index 8a4dab7522..34df4a3c5f 100644 --- a/source4/libcli/namecache.c +++ b/source4/libcli/namecache.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "system/time.h" #define NBTKEY_FMT "NBT/%s#%02X" diff --git a/source4/libcli/namequery.c b/source4/libcli/namequery.c index 7a2d697797..8dae5e1206 100644 --- a/source4/libcli/namequery.c +++ b/source4/libcli/namequery.c @@ -21,6 +21,7 @@ #include "includes.h" #include "system/network.h" +#include "system/time.h" /* A netbios node status array element. */ struct node_status { diff --git a/source4/libcli/nmblib.c b/source4/libcli/nmblib.c index ef5210cf63..120b937be5 100644 --- a/source4/libcli/nmblib.c +++ b/source4/libcli/nmblib.c @@ -21,6 +21,7 @@ #include "includes.h" #include "system/network.h" +#include "system/time.h" static const struct opcode_names { const char *nmb_opcode_name; diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index a6e8071a05..e70ee915c6 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -21,6 +21,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" static void smbcli_transport_process_recv(struct smbcli_transport *transport); diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c index da7bcabda9..4f7d7b4058 100644 --- a/source4/libcli/raw/rawnegotiate.c +++ b/source4/libcli/raw/rawnegotiate.c @@ -21,6 +21,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" static const struct { enum protocol_types prot; diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c index 1089c3a4cf..1cf0890ba8 100644 --- a/source4/libcli/util/smbencrypt.c +++ b/source4/libcli/util/smbencrypt.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "system/time.h" #include "byteorder.h" /* diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 6a5eec7c26..fefddce39b 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -20,6 +20,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_srvsvc.h" +#include "system/time.h" /* * get the remote time of a server via srvsvc_NetRemoteTOD diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c index 79f014d967..613de08087 100644 --- a/source4/ntvfs/posix/pvfs_dirlist.c +++ b/source4/ntvfs/posix/pvfs_dirlist.c @@ -23,6 +23,7 @@ #include "includes.h" #include "vfs_posix.h" +#include "system/dir.h" struct pvfs_dir { struct pvfs_state *pvfs; diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index 3835c9319b..3625fc7891 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -22,6 +22,7 @@ #include "include/includes.h" #include "vfs_posix.h" +#include "system/time.h" /* diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index bfaa7bf5a1..bc56962912 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -22,6 +22,7 @@ #include "include/includes.h" #include "vfs_posix.h" +#include "system/time.h" /* create file handles with convenient numbers for sniffers diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index 672d028dd5..551b05b248 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -29,6 +29,7 @@ #include "include/includes.h" #include "vfs_posix.h" +#include "system/dir.h" /* compare two filename components. This is where the name mangling hook will go diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index 43d0f946b7..18e22c2e98 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -22,6 +22,7 @@ #include "include/includes.h" #include "vfs_posix.h" +#include "system/time.h" /* the state of a search started with pvfs_search_first() */ diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c index bc96f25fec..8a4c6e433d 100644 --- a/source4/ntvfs/posix/pvfs_setfileinfo.c +++ b/source4/ntvfs/posix/pvfs_setfileinfo.c @@ -22,6 +22,7 @@ #include "include/includes.h" #include "vfs_posix.h" +#include "system/time.h" /* set info on a open file diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c index 2ac12b1918..cfe846a828 100644 --- a/source4/ntvfs/simple/svfs_util.c +++ b/source4/ntvfs/simple/svfs_util.c @@ -25,6 +25,8 @@ #include "includes.h" #include "svfs.h" +#include "system/time.h" +#include "system/dir.h" /* convert a windows path to a unix path - don't do any manging or case sensitive handling diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 379d24f848..c84483ea23 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -28,6 +28,7 @@ #include "includes.h" #include "svfs.h" +#include "system/time.h" #ifndef O_DIRECTORY #define O_DIRECTORY 0 diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index c4518d620f..ffc539ef18 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -53,6 +53,7 @@ */ #include "includes.h" +#include "system/time.h" #include "librpc/gen_ndr/ndr_svcctl.h" BOOL in_client = False; /* Not in the client by default */ diff --git a/source4/rpc_server/netlogon/schannel_state.c b/source4/rpc_server/netlogon/schannel_state.c index 5657b1cd64..6e46108e7a 100644 --- a/source4/rpc_server/netlogon/schannel_state.c +++ b/source4/rpc_server/netlogon/schannel_state.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/time.h" /* a reasonable amount of time to keep credentials live */ #define SCHANNEL_CREDENTIALS_EXPIRY 600 diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 572f5b0816..b3938ce417 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/ndr_samr.h" #include "rpc_server/common/common.h" #include "rpc_server/samr/dcesrv_samr.h" +#include "system/time.h" diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c index 60d5927207..cce412dfb7 100644 --- a/source4/rpc_server/samr/samr_password.c +++ b/source4/rpc_server/samr/samr_password.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/ndr_samr.h" #include "rpc_server/common/common.h" #include "rpc_server/samr/dcesrv_samr.h" +#include "system/time.h" /* samr_ChangePasswordUser diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index a1a90852a1..521cfd7de9 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/time.h" /* diff --git a/source4/smbd/service.c b/source4/smbd/service.c index d9841b63b2..b7be3a1e6a 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "system/dir.h" struct server_context *server_service_startup(const char *model) { diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c index 00187cbeac..aea94bd5a1 100644 --- a/source4/torture/basic/locking.c +++ b/source4/torture/basic/locking.c @@ -23,6 +23,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" /* This test checks for two things: diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c index 7cf1d43b81..a2d992cfc7 100644 --- a/source4/torture/basic/secleak.c +++ b/source4/torture/basic/secleak.c @@ -22,6 +22,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" static BOOL try_failed_login(struct smbcli_state *cli) { diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index 59775e02d9..583cec5b45 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/time.h" #include "libcli/raw/libcliraw.h" #define NSERVERS 2 diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c index eeca81e470..ab64044513 100644 --- a/source4/torture/local/iconv.c +++ b/source4/torture/local/iconv.c @@ -23,6 +23,7 @@ #include "includes.h" #include "system/iconv.h" +#include "system/time.h" #if HAVE_NATIVE_ICONV /* diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c index 6d5558c6fd..2461785512 100644 --- a/source4/torture/locktest.c +++ b/source4/torture/locktest.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/time.h" static int numops = 1000; static BOOL showall; diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c index c112158492..1f4bce0288 100644 --- a/source4/torture/masktest.c +++ b/source4/torture/masktest.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" static fstring password; static fstring username; diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c index 9e4a08eea4..5ef791037a 100644 --- a/source4/torture/nbench/nbio.c +++ b/source4/torture/nbench/nbio.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/time.h" #define MAX_FILES 100 diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c index 7a53c9be4a..f6884f37c9 100644 --- a/source4/torture/raw/close.c +++ b/source4/torture/raw/close.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/time.h" /* basic testing of all RAW_CLOSE_* calls diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c index 9d7ff0a28f..034c793260 100644 --- a/source4/torture/raw/lock.c +++ b/source4/torture/raw/lock.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" #define CHECK_STATUS(status, correct) do { \ if (!NT_STATUS_EQUAL(status, correct)) { \ diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 5da0338552..03621dca45 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" /* enum for whether reads/writes are possible on a file */ enum rdwr_mode {RDWR_NONE, RDWR_RDONLY, RDWR_WRONLY, RDWR_RDWR}; diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index 46b5f9403a..8b76a5a029 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" #define CHECK_STATUS(status, correct) do { \ if (!NT_STATUS_EQUAL(status, correct)) { \ diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c index f4baf1f020..d0368df5b6 100644 --- a/source4/torture/raw/setfileinfo.c +++ b/source4/torture/raw/setfileinfo.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "system/time.h" #define BASEDIR "\\testsfileinfo" diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c index 28faf6b22c..585e231cac 100644 --- a/source4/torture/raw/write.c +++ b/source4/torture/raw/write.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" #define CHECK_STATUS(status, correct) do { \ if (!NT_STATUS_EQUAL(status, correct)) { \ diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 15ecd02923..969e68265d 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "system/time.h" int torture_nprocs=4; int torture_numops=100; diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c index 41e616b5be..0c0464507d 100644 --- a/source4/torture/torture_util.c +++ b/source4/torture/torture_util.c @@ -21,6 +21,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" #include "system/shmem.h" +#include "system/time.h" static struct timeval tp1,tp2; diff --git a/source4/utils/net/net_time.c b/source4/utils/net/net_time.c index 2efe8faffe..e32ec76293 100644 --- a/source4/utils/net/net_time.c +++ b/source4/utils/net/net_time.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "system/time.h" /* * Code for getting the remote time |