summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in397
-rw-r--r--source3/include/includes.h1426
-rw-r--r--source3/include/local.h6
-rw-r--r--source3/include/proto.h39
-rw-r--r--source3/include/smb.h39
5 files changed, 657 insertions, 1250 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
new file mode 100644
index 0000000000..3bc3e95e4f
--- /dev/null
+++ b/source3/include/config.h.in
@@ -0,0 +1,397 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+#undef _ALL_SOURCE
+#endif
+
+/* Define if type char is unsigned and you are not using gcc. */
+#ifndef __CHAR_UNSIGNED__
+#undef __CHAR_UNSIGNED__
+#endif
+
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define if your struct stat has st_rdev. */
+#undef HAVE_ST_RDEV
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef mode_t
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef pid_t
+
+/* Define as the return type of signal handlers (int or void). */
+#undef RETSIGTYPE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define if your processor stores words with the most significant
+ byte first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+#undef HAVE_BROKEN_READDIR
+#undef HAVE_ERRNO_DECL
+#undef HAVE_LONGLONG
+#undef HAVE_OFF64_T
+#undef HAVE_REMSH
+#undef HAVE_UNSIGNED_CHAR
+#undef HAVE_UTIMBUF
+#undef ino_t
+#undef HAVE_CONNECT
+#undef HAVE_SHORT_INO_T
+#undef WITH_AFS
+#undef WITH_DFS
+#undef SUNOS5
+#undef SUNOS4
+#undef LINUX
+#undef AIX
+#undef IRIX
+#undef HPUX
+#undef QNX
+#undef SCO
+#undef OSF1
+#undef NEXT2
+#undef HAVE_SHARED_MMAP
+#undef HAVE_SYSV_IPC
+#undef HAVE_FCNTL_LOCK
+#undef HAVE_FTRUNCATE_EXTEND
+#undef HAVE_TRAPDOOR_UID
+#undef HAVE_ROOT
+#undef HAVE_UNION_SEMUN
+#undef HAVE_NETMASK_IFCONF
+#undef HAVE_GETTIMEOFDAY_TZ
+#undef HAVE_SOCK_SIN_LEN
+#undef STAT_READ_FILSYS
+#undef STAT_STATFS2_BSIZE
+#undef STAT_STATFS2_FSIZE
+#undef STAT_STATFS2_FS_DATA
+#undef STAT_STATFS3_OSF1
+#undef STAT_STATFS4
+#undef STAT_STATVFS
+#undef HAVE_NETMASK_IFREQ
+#undef HAVE_NETMASK_AIX
+#undef HAVE_CRYPT
+#undef WITH_MMAP
+#undef WITH_SYSLOG
+#undef WITH_SSL
+#undef WITH_LDAP
+#undef WITH_NISPLUS
+#undef WITH_AUTOMOUNT
+#undef HAVE_PAM_AUTHENTICATE
+
+/* The number of bytes in a int. */
+#undef SIZEOF_INT
+
+/* The number of bytes in a long. */
+#undef SIZEOF_LONG
+
+/* The number of bytes in a short. */
+#undef SIZEOF_SHORT
+
+/* Define if you have the atexit function. */
+#undef HAVE_ATEXIT
+
+/* Define if you have the bigcrypt function. */
+#undef HAVE_BIGCRYPT
+
+/* Define if you have the chmod function. */
+#undef HAVE_CHMOD
+
+/* Define if you have the chown function. */
+#undef HAVE_CHOWN
+
+/* Define if you have the chroot function. */
+#undef HAVE_CHROOT
+
+/* Define if you have the crypt16 function. */
+#undef HAVE_CRYPT16
+
+/* Define if you have the dup2 function. */
+#undef HAVE_DUP2
+
+/* Define if you have the execl function. */
+#undef HAVE_EXECL
+
+/* Define if you have the fstat function. */
+#undef HAVE_FSTAT
+
+/* Define if you have the fsync function. */
+#undef HAVE_FSYNC
+
+/* Define if you have the ftruncate function. */
+#undef HAVE_FTRUNCATE
+
+/* Define if you have the getauthuid function. */
+#undef HAVE_GETAUTHUID
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getgrnam function. */
+#undef HAVE_GETGRNAM
+
+/* Define if you have the getprpwnam function. */
+#undef HAVE_GETPRPWNAM
+
+/* Define if you have the getrlimit function. */
+#undef HAVE_GETRLIMIT
+
+/* Define if you have the getspnam function. */
+#undef HAVE_GETSPNAM
+
+/* Define if you have the glob function. */
+#undef HAVE_GLOB
+
+/* Define if you have the grantpt function. */
+#undef HAVE_GRANTPT
+
+/* Define if you have the initgroups function. */
+#undef HAVE_INITGROUPS
+
+/* Define if you have the innetgr function. */
+#undef HAVE_INNETGR
+
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the mktime function. */
+#undef HAVE_MKTIME
+
+/* Define if you have the pathconf function. */
+#undef HAVE_PATHCONF
+
+/* Define if you have the pipe function. */
+#undef HAVE_PIPE
+
+/* Define if you have the putprpwnam function. */
+#undef HAVE_PUTPRPWNAM
+
+/* Define if you have the rdchk function. */
+#undef HAVE_RDCHK
+
+/* Define if you have the rename function. */
+#undef HAVE_RENAME
+
+/* Define if you have the select function. */
+#undef HAVE_SELECT
+
+/* Define if you have the set_auth_parameters function. */
+#undef HAVE_SET_AUTH_PARAMETERS
+
+/* Define if you have the setgroups function. */
+#undef HAVE_SETGROUPS
+
+/* Define if you have the setluid function. */
+#undef HAVE_SETLUID
+
+/* Define if you have the setresuid function. */
+#undef HAVE_SETRESUID
+
+/* Define if you have the setsid function. */
+#undef HAVE_SETSID
+
+/* Define if you have the setuidx function. */
+#undef HAVE_SETUIDX
+
+/* Define if you have the sigaction function. */
+#undef HAVE_SIGACTION
+
+/* Define if you have the sigblock function. */
+#undef HAVE_SIGBLOCK
+
+/* Define if you have the sigprocmask function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strdup function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the strftime function. */
+#undef HAVE_STRFTIME
+
+/* Define if you have the strpbrk function. */
+#undef HAVE_STRPBRK
+
+/* Define if you have the utime function. */
+#undef HAVE_UTIME
+
+/* Define if you have the utimes function. */
+#undef HAVE_UTIMES
+
+/* Define if you have the vsnprintf function. */
+#undef HAVE_VSNPRINTF
+
+/* Define if you have the waitpid function. */
+#undef HAVE_WAITPID
+
+/* Define if you have the yp_get_default_domain function. */
+#undef HAVE_YP_GET_DEFAULT_DOMAIN
+
+/* Define if you have the <compat.h> header file. */
+#undef HAVE_COMPAT_H
+
+/* Define if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <grp.h> header file. */
+#undef HAVE_GRP_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <ndir.h> header file. */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
+/* Define if you have the <netinet/tcp.h> header file. */
+#undef HAVE_NETINET_TCP_H
+
+/* Define if you have the <security/pam_appl.h> header file. */
+#undef HAVE_SECURITY_PAM_APPL_H
+
+/* Define if you have the <shadow.h> header file. */
+#undef HAVE_SHADOW_H
+
+/* Define if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/dir.h> header file. */
+#undef HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/dustat.h> header file. */
+#undef HAVE_SYS_DUSTAT_H
+
+/* Define if you have the <sys/fcntl.h> header file. */
+#undef HAVE_SYS_FCNTL_H
+
+/* Define if you have the <sys/filio.h> header file. */
+#undef HAVE_SYS_FILIO_H
+
+/* Define if you have the <sys/filsys.h> header file. */
+#undef HAVE_SYS_FILSYS_H
+
+/* Define if you have the <sys/fs/s5param.h> header file. */
+#undef HAVE_SYS_FS_S5PARAM_H
+
+/* Define if you have the <sys/id.h> header file. */
+#undef HAVE_SYS_ID_H
+
+/* Define if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define if you have the <sys/mode.h> header file. */
+#undef HAVE_SYS_MODE_H
+
+/* Define if you have the <sys/mount.h> header file. */
+#undef HAVE_SYS_MOUNT_H
+
+/* Define if you have the <sys/ndir.h> header file. */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/security.h> header file. */
+#undef HAVE_SYS_SECURITY_H
+
+/* Define if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H
+
+/* Define if you have the <sys/statfs.h> header file. */
+#undef HAVE_SYS_STATFS_H
+
+/* Define if you have the <sys/statvfs.h> header file. */
+#undef HAVE_SYS_STATVFS_H
+
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/unistd.h> header file. */
+#undef HAVE_SYS_UNISTD_H
+
+/* Define if you have the <sys/vfs.h> header file. */
+#undef HAVE_SYS_VFS_H
+
+/* Define if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define if you have the crypt library (-lcrypt). */
+#undef HAVE_LIBCRYPT
+
+/* Define if you have the dl library (-ldl). */
+#undef HAVE_LIBDL
+
+/* Define if you have the inet library (-linet). */
+#undef HAVE_LIBINET
+
+/* Define if you have the nsl library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define if you have the nsl_s library (-lnsl_s). */
+#undef HAVE_LIBNSL_S
+
+/* Define if you have the pam library (-lpam). */
+#undef HAVE_LIBPAM
+
+/* Define if you have the socket library (-lsocket). */
+#undef HAVE_LIBSOCKET
diff --git a/source3/include/includes.h b/source3/include/includes.h
index d72595b6b4..b63787fd5e 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -20,1221 +20,274 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/*
- This file does all the #includes's. This makes it easier to
- port to a new unix. Hopefully a port will only have to edit the Makefile
- and add a section for the new unix below.
-*/
-
-
-/* the first OS dependent section is to setup what includes will be used.
- the main OS dependent section comes later on
-*/
-
-#ifdef ALTOS
-#define NO_UTIMEH
-#endif
-
-#ifdef MIPS
-#define POSIX_H
-#define NO_UTIMEH
-#endif
-#ifdef sun386
-#define NO_UTIMEH
-#endif
+#include "config.h"
+#include "local.h"
-#ifdef NEXT2
-#define NO_UTIMEH
+#ifdef AIX
+#define DEFAULT_PRINTING PRINT_AIX
#endif
-#ifdef NEXT3_0
-#define NO_UTIMEH
-#define NO_UNISTDH
+#ifdef HPUX
+#define DEFAULT_PRINTING PRINT_HPUX
#endif
-#ifdef APOLLO
-#define NO_UTIMEH
-#define NO_SYSMOUNTH
-#define NO_UNISTDH
+#ifdef QNX
+#define DEFAULT_PRINTING PRINT_QNX
#endif
-#ifdef AIX
-#define NO_SYSMOUNTH
+#ifdef SUNOS4
+#define REPLACE_GETPASS
+/* on SUNOS4 termios.h conflicts with sys/ioctl.h */
+#undef HAVE_TERMIOS_H
#endif
-#ifdef M88K_R3
-#define SVR3H
-#define NO_RESOURCEH
+#ifdef SUNOS5
+#define REPLACE_GETPASS
#endif
-#ifdef DNIX
-#define NO_SYSMOUNTH
-#define NO_NETIFH
-#define NO_RESOURCEH
-#define PRIME_NMBD 0
-#define NO_SETGROUPS
-#endif
+#include <sys/types.h>
-#ifdef ISC
-#define SYSSTREAMH
-#define NO_RESOURCEH
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
#endif
+#include <stdio.h>
+#include <stddef.h>
-#ifdef QNX
-#define NO_RESOURCEH
-#define NO_SYSMOUNTH
-#define USE_MMAP 1
-#ifdef __386__
- #define __i386__
-#endif
-#define SHADOW_PWD
-#define NO_GETSPNAM
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
#endif
-#ifdef NEWS42
-#define NO_UTIMEH
-#define NO_STRFTIME
-#define NO_UTIMBUF
-#define REPLACE_MKTIME
-#define NO_TM_NAME
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
#endif
-#ifdef OS2
-#define NO_SYSMOUNTH
-#define NO_NETIFH
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
#endif
-#ifdef LYNX
-#define NO_SYSMOUNTH
+#ifdef HAVE_STRING_H
+#include <string.h>
#endif
-
-#if (defined(SHADOW_PWD)||defined(OSF1_ENH_SEC)||defined(SecureWare)||defined(PWDAUTH))
-#define PASSWORD_LENGTH 16
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
#endif
-/* here is the general includes section - with some ifdefs generated
- by the previous section
-*/
-#include "local.h"
-#include <stdio.h>
-#ifdef POSIX_STDLIBH
-#include <posix/stdlib.h>
-#else
-#include <stdlib.h>
-#endif
-#include <ctype.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
#include <time.h>
-#ifndef NO_UTIMEH
-#include <utime.h>
-#endif
-#include <sys/types.h>
-
-#ifdef SVR3H
-#include <sys/statfs.h>
-#include <sys/stream.h>
-#include <netinet/types.h>
-#include <netinet/ether.h>
-#include <netinet/ip_if.h>
-#endif
-
-#include <sys/socket.h>
-#ifdef AXPROC
-#include <termio.h>
-#endif
-#include <sys/ioctl.h>
-#include <stddef.h>
-#ifdef POSIX_H
-#include <posix/utime.h>
-#include <bsd/sys/time.h>
-#include <bsd/netinet/in.h>
#else
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
-#include <netinet/in.h>
-#endif
-#include <netdb.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <grp.h>
-#ifndef NO_RESOURCEH
-#include <sys/resource.h>
-#endif
-#ifndef NO_SYSMOUNTH
-#include <sys/mount.h>
-#endif
-#include <pwd.h>
-#ifdef __STDC__
-#include <stdarg.h>
#else
-#include <varargs.h>
-#endif
-#ifndef NO_UNISTDH
-#include <unistd.h>
+#include <time.h>
#endif
-#include <sys/wait.h>
-#ifdef SYSSTREAMH
-#include <sys/stream.h>
#endif
-#ifndef NO_NETIFH
-#ifdef POSIX_H
-#include <bsd/net/if.h>
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
#else
-#ifdef OSF1
-#include <net/route.h>
-#include <sys/mbuf.h>
-#endif
-#include <net/if.h>
+#ifdef HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>
#endif
#endif
-#if defined(GETPWANAM)
-#include <sys/types.h>
-#include <sys/label.h>
-#include <sys/audit.h>
-#include <pwdadj.h>
-#endif
+#include <sys/stat.h>
-#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(FreeBSD) && !defined(CONVEX) && !defined(__OpenBSD__)
-#include <shadow.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
#endif
-#ifdef SYSLOG
-#include <syslog.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
#endif
-#ifdef HAVE_REGEX_H
-#include <regex.h>
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
#endif
+#include <signal.h>
-/***************************************************************************
-Here come some platform specific sections
-***************************************************************************/
-
-
-#ifdef LINUX
-#include <arpa/inet.h>
-#include <dirent.h>
-#include <string.h>
-#include <sys/vfs.h>
-#include <netinet/in.h>
-#ifdef GLIBC2
-#define _LINUX_C_LIB_VERSION_MAJOR 6
-#include <termios.h>
-#include <rpcsvc/ypclnt.h>
-#include <crypt.h>
-#include <netinet/tcp.h>
-#include <netinet/ip.h>
-#endif
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif /* QSORT_CAST */
-#define SIGNAL_CAST (__sighandler_t)
-#define USE_GETCWD
-#define USE_SETSID
-#define HAVE_BZERO
-#define HAVE_MEMMOVE
-#define HAVE_VSNPRINTF
-#define USE_SIGPROCMASK
-#define USE_WAITPID
-#define USE_SYSV_IPC
-#if 0
-/* SETFS disabled until we can check on some bug reports */
-#if _LINUX_C_LIB_VERSION_MAJOR >= 5
-#define USE_SETFS
-#endif
-#endif
-#ifdef SHADOW_PWD
-#if _LINUX_C_LIB_VERSION_MAJOR < 5
-#ifndef crypt
-#define crypt pw_encrypt
-#endif
-#endif
-#endif
-#endif
-
-#ifdef SUNOS4
-#define SIGNAL_CAST (void (*)(int))
-#include <netinet/tcp.h>
-#include <dirent.h>
-#include <sys/acct.h>
-#include <sys/vfs.h>
-#include <string.h>
-#include <strings.h>
-#include <errno.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
-#include <signal.h>
-/* #include <termios.h> */
-#ifdef sun386
-#define NO_STRFTIME
-#define NO_UTIMBUF
-#define mktime timelocal
-typedef unsigned short mode_t;
-#else
-#include <utime.h>
-#define NO_STRERROR
#endif
-#ifndef REPLACE_GETPASS
-#define REPLACE_GETPASS
-#endif
-#ifndef BSD_TERMIO
-#define BSD_TERMIO
-#endif
-#ifndef USE_SIGPROCMASK
-#define USE_SIGPROCMASK
-#endif
-#ifndef USE_WAITPID
-#define USE_WAITPID
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
#endif
-#define USE_SYSV_IPC
-/* SunOS doesn't have POSIX atexit */
-#define atexit on_exit
-#define NOSTRCASECMP
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif /* QSORT_CAST */
+#ifdef HAVE_GRP_H
+#include <grp.h>
#endif
-
-
-#ifdef SUNOS5
-#include <fcntl.h>
-#include <dirent.h>
-#include <sys/acct.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <sys/filio.h>
-#include <sys/sockio.h>
-#include <netinet/in_systm.h>
-#include <netinet/tcp.h>
-#include <netinet/ip.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <rpcsvc/ypclnt.h>
-#include <termios.h>
-#include <sys/stropts.h>
-#if !defined(USE_LIBDES) && !defined(KRB4_AUTH)
-#include <crypt.h>
-#endif /* !USE_LIBDES && !KRB4_AUTH */
-extern int gettimeofday (struct timeval *, void *);
-extern int gethostname (char *name, int namelen);
-extern int innetgr (const char *, const char *, const char *, const char *);
-#define USE_SETVBUF
-#define SIGNAL_CAST (void (*)(int))
-#ifndef SYSV
-#define SYSV
-#endif
-#define USE_WAITPID
-#define REPLACE_STRLEN
-#define USE_STATVFS
-#define USE_GETCWD
-#define USE_SETSID
-#define USE_SYSV_IPC
-#define NO_SEMUN
-#ifndef REPLACE_GETPASS
-#define REPLACE_GETPASS
-#endif /* REPLACE_GETPASS */
-#define USE_SIGPROCMASK
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif /* QSORT_CAST */
-#define USE_GRANTPT
+#ifdef HAVE_SYS_ID_H
+#include <sys/id.h>
#endif
+#include <errno.h>
-#ifdef ULTRIX
-#include <strings.h>
-#include <nfs/nfs_clnt.h>
-#include <nfs/vfs.h>
-#include <netinet/tcp.h>
-#ifdef ULTRIX_AUTH
-#include <auth.h>
-#endif
-char *getwd(char *);
-#define NOSTRDUP
-#ifdef __STDC__
-#define SIGNAL_CAST (void(*)(int))
-#endif
-#define USE_DIRECT
-#define USE_WAITPID
+#ifdef HAVE_UTIME_H
+#include <utime.h>
#endif
-#ifdef SGI4
-#include <netinet/tcp.h>
-#include <sys/statfs.h>
-#include <string.h>
-#include <signal.h>
-#ifndef SYSV
-#define SYSV
-#endif
-#define SIGNAL_CAST (void (*)())
-#define STATFS4
-#define USE_WAITPID
-#define USE_DIRECT
-#define USE_SETSID
-#define USE_SYSV_IPC
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
#endif
-#if defined(SGI5) || defined(SGI6)
-#include <arpa/inet.h>
-#include <netinet/tcp.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <sys/statvfs.h>
-#include <string.h>
-#include <signal.h>
-#include <dirent.h>
-#include <termios.h>
-#define USE_WAITPID
-#define NETGROUP
-#ifndef SYSV
-#define SYSV
-#endif /* SYSV */
-#define SIGNAL_CAST (void (*)())
-#define USE_STATVFS
-#define USE_WAITPID
-#define USE_SETSID
-#define USE_SYSV_IPC
-#define USE_GRANTPT
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif /* QSORT_CAST */
+#ifdef HAVE_SYS_MODE_H
+/* apparently AIX needs this for S_ISLNK */
+#ifndef S_ISLNK
+#include <sys/mode.h>
#endif
-
-
-#ifdef MIPS
-#include <bsd/net/soioctl.h>
-#include <string.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/statfs.h>
-#include <sys/wait.h>
-#include <sys/termio.h>
-#define SIGNAL_CAST (void (*)())
-typedef int mode_t;
-extern struct group *getgrnam();
-extern struct passwd *getpwnam();
-#define STATFS4
-#define NO_STRERROR
-#define REPLACE_STRSTR
-#endif /* MIPS */
-
-
-
-#ifdef DGUX
-#include <string.h>
-#include <dirent.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <fcntl.h>
-#include <termios.h>
-#define SYSV
-#define USE_WAITPID
-#define SIGNAL_CAST (void (*)(int))
-#define STATFS4
-#define USE_GETCWD
#endif
-
-#ifdef SVR4
-#include <string.h>
-#include <sys/dir.h>
-#include <dirent.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <sys/vfs.h>
-#include <sys/filio.h>
-#include <fcntl.h>
-#include <sys/sockio.h>
-#include <netinet/tcp.h>
-#include <stropts.h>
-#include <termios.h>
-#define SYSV
-#define USE_WAITPID
-#define SIGNAL_CAST (void (*)(int))
-#define USE_STATVFS
-#define USE_GETCWD
-#define USE_SETSID
-#define USE_SYSV_IPC
-#define NO_SEMUN
-#define USE_GRANTPT
+#ifdef HAVE_GLOB
+#include <glob.h>
#endif
-
-#ifdef OSF1
-#include <termios.h>
-#include <strings.h>
-#include <dirent.h>
-char *getwd(char *);
-char *mktemp(char *); /* No standard include */
-#include <netinet/in.h>
-#include <arpa/inet.h> /* both for inet_ntoa */
-#define SIGNAL_CAST ( void (*) (int) )
-#define STATFS3
-#define USE_F_FSIZE
-#define USE_SETSID
-#include <netinet/tcp.h>
-#ifdef OSF1_ENH_SEC
#include <pwd.h>
-#include <sys/types.h>
-#include <sys/security.h>
-#include <prot.h>
-#include <unistd.h>
-#define PASSWORD_LENGTH 16
-#define NEED_AUTH_PARAMETERS
-#endif /* OSF1_ENH_SEC */
-#define USE_SYSV_IPC
-#define NO_SEMUN
-#endif
-
-
-#ifdef CLIX
-#include <dirent.h>
-#define SIGNAL_CAST (void (*)())
-#include <sys/fcntl.h>
-#include <sys/statfs.h>
-#include <string.h>
-#define NO_EID
-#define USE_WAITPID
-#define STATFS4
-#define NO_FSYNC
-#define USE_GETCWD
-#define USE_SETSID
-#ifndef REPLACE_GETPASS
-#define REPLACE_GETPASS
-#endif /* REPLACE_GETPASS */
-#define NO_GETRLIMIT
-#endif /* CLIX */
-
-
-
-#ifdef BSDI
-#include <string.h>
-#include <netinet/tcp.h>
-#define SIGNAL_CAST (void (*)())
-#define USE_DIRECT
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
-
-#ifdef NETBSD
-#ifdef NetBSD1_3
-#include <string.h>
-#ifdef ALLOW_CHANGE_PASSWORD
-#include <termios.h>
-#endif /* ALLOW_CHANGE_PASSWORD */
-#else /* NetBSD1_3 */
-#include <strings.h>
-#endif /* NetBSD1_3 */
-#include <netinet/tcp.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-/* you may not need this */
-#define NO_GETSPNAM
-#define SIGNAL_CAST (void (*)())
-#define USE_DIRECT
-#define REPLACE_INNETGR
-#endif
-
+#include <grp.h>
-#ifdef FreeBSD
-#include <arpa/inet.h>
-#include <strings.h>
-#include <netinet/tcp.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <termios.h>
-#include <fcntl.h>
-#if __FreeBSD__ >= 3
-#include <dirent.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
#else
-#define USE_DIRECT
-#endif
-#define SIGNAL_CAST (void (*)(int))
-#define USE_SETVBUF
-#define USE_SETSID
-#define USE_GETCWD
-#define USE_WAITPID
-#define HAVE_MEMMOVE
-#define HAVE_BZERO
-#define HAVE_GETTIMEOFDAY
-#define HAVE_PATHCONF
-#define HAVE_GETGRNAM 1
-#define HAVE_VSNPRINTF
-#define QSORT_CAST (int (*)(const void *, const void *))
-#if !defined(O_SYNC)
-#if defined(O_FSYNC)
-#define O_SYNC O_FSYNC
-#else /* defined(O_FSYNC) */
-#define O_SYNC 0
-#endif /* defined(O_FSYNC) */
-#endif /* !defined(O_SYNC) */
-#endif /* FreeBSD */
-
-#ifdef __OpenBSD__
-#include <strings.h>
-#include <netinet/tcp.h>
-#define NO_GETSPNAM
-#define SIGNAL_CAST (void (*)())
-#define USE_DIRECT
-#define REPLACE_INNETGR
-#define HAVE_BZERO
-#define HAVE_PATHCONF
-#define HAVE_GETGRNAM 1
-#define HAVE_GETTIMEOFDAY
-#define HAVE_MEMMOVE
-#define USE_GETCWD
-#define USE_SETSID
-#endif
+#include <varargs.h>
+#endif
-#ifdef AIX
-#include <strings.h>
-#include <sys/dir.h>
-#include <sys/select.h>
-#include <dirent.h>
-#include <sys/statfs.h>
-#include <sys/vfs.h>
-#include <sys/id.h>
-#include <sys/priv.h>
-#ifdef ALLOW_CHANGE_PASSWORD
-#include <termios.h>
-#endif /* ALLOW_CHANGE_PASSWORD */
-/* According to AIX 4.1 man pages, inet_ntoa needs the following headers */
-#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <netinet/tcp.h>
-#include <locale.h>
-#include <grp.h>
-#define HAVE_GETGRNAM 1
-#define SYSV
-#define USE_WAITPID
-#define USE_SIGBLOCK
-#define SIGNAL_CAST (void (*)())
-#define DEFAULT_PRINTING PRINT_AIX
-/* we undef this because sys/param.h is broken in aix. uggh. */
-#undef MAXHOSTNAMELEN
-#endif
-
-
-#ifdef HPUX
-#include <string.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/vfs.h>
-#include <sys/types.h>
-#include <sys/termios.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h> /* needed for inet_ntoa proto */
-#ifdef HPUX_10_TRUSTED
-#include <hpsecurity.h>
-#include <prot.h>
-#define NEED_AUTH_PARAMETERS
-#endif
-#define SIGNAL_CAST (void (*)(__harg))
-#ifdef HPUX10
-#include <stropts.h>
-#else /* HPUX10 */
-/* This is only needed for HPUX 9.x */
-#define SELECT_CAST (int *)
-#endif /* HPUX10 */
-#define SYSV
-#define USE_WAITPID
-#define WAIT3_CAST2 (int *)
-#define USE_GETCWD
-#define USE_SETSID
-#define USE_SETRES
-#define USE_SYSV_IPC
-#define NO_SEMUN
-#define DEFAULT_PRINTING PRINT_HPUX
-/* Ken Weiss <krweiss@ucdavis.edu> tells us that SIGCLD_IGNORE is
- not good for HPUX */
-/* #define SIGCLD_IGNORE */
-#define USE_SIGPROCMASK /* Needed to stop zombie processes on HPUX 9.x and 10.x.*/
-#endif /* HPUX */
-
-
-#ifdef SEQUENT
-#include <signal.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/statfs.h>
-#include <sys/stat.h>
-#include <sys/buf.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <fcntl.h>
-#define SIGNAL_CAST (void (*)(int))
-#define USE_WAITPID
-#define USE_GETCWD
-#define NO_EID
-#define STATFS4
-#define USE_DIRECT
-#ifdef PTX4
-#undef USE_DIRECT
-#endif
-#endif
-
-
+#include <netdb.h>
+#include <syslog.h>
+#include <sys/file.h>
-#ifdef SEQUENT_PTX4
-#include <string.h>
-#include <sys/dir.h>
-#include <dirent.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <sys/vfs.h>
-#include <fcntl.h>
-#include <sys/sockio.h>
+#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
-#include <stropts.h>
-#include <termios.h>
-#define SYSV
-#define USE_WAITPID
-#define SIGNAL_CAST (void (*)(int))
-#define USE_STATVFS
-#define USE_GETCWD
-#ifndef seteuid
-#define seteuid(uid) setreuid(-1,uid)
-#endif
-#ifndef setegid
-#define setegid(gid) setregid(-1,gid)
-#endif
#endif
-
-#ifdef NEXT2
-#include <sys/types.h>
-#include <strings.h>
-#include <dirent.h>
-#include <sys/vfs.h>
-#define bzero(b,len) memset(b,0,len)
-#define mode_t int
-#define NO_UTIMBUF
-#include <libc.h>
-#define NOSTRDUP
-#define USE_DIRECT
-#define USE_WAITPID
-#endif
-
-
-#ifdef NEXT3_0
-#include <strings.h>
-#include <sys/dir.h>
-#include <sys/vfs.h>
-#define NO_UTIMBUF
-#include <libc.h>
-#define NOSTRDUP
-#define USE_DIRECT
-#define mode_t int
-#define GID_TYPE int
-#define gid_t int
-#define pid_t int
-#define SIGNAL_CAST (void (*)(int))
-#define WAIT3_CAST1 (union wait *)
-#define HAVE_GMTOFF
-#define O_NONBLOCK O_NDELAY
-#endif
-
-
-
-#ifdef APOLLO
-#include <string.h>
-#include <fcntl.h>
-#include <sys/statfs.h>
-#define NO_UTIMBUF
-#define USE_DIRECT
-#define USE_GETCWD
-#define SIGNAL_CAST (void (*)())
-#define HAVE_FCNTL_LOCK 0
-#define HAVE_GETTIMEOFDAY
-#define STATFS4
-#endif
-
-
-
-#ifdef SCO
-#include <sys/netinet/tcp.h>
-#include <sys/netinet/in_systm.h>
-#include <sys/netinet/ip.h>
-#include <dirent.h>
-#include <string.h>
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
-#include <fcntl.h>
-#include <sys/statfs.h>
-#include <sys/stropts.h>
-#include <limits.h>
-#include <locale.h>
-#ifdef EVEREST
-#include <unistd.h>
-#endif /* EVEREST */
-#ifdef NETGROUP
-#include <rpcsvc/ypclnt.h>
-#endif /* NETGROUP */
-#ifdef SecureWare
-#include <sys/security.h>
-#include <sys/audit.h>
-#include <prot.h>
-#define crypt bigcrypt
-#endif /* SecureWare */
-#define SIGNAL_CAST (void (*)(int))
-#define USE_WAITPID
-#define USE_GETCWD
-#define USE_SETSID
-#ifdef SCO3_2_2
-#define setuid(u) setreuid(u,-1)
-#define seteuid(u) setreuid(-1,u)
-#else /* SCO3_2_2 */
-#ifndef EVEREST
-#define ftruncate(f,l) syscall(0x0a28,f,l)
-#define USE_IFREQ
-#define NO_INITGROUPS
-#endif /* EVEREST */
-#endif /* SCO3_2_2 */
-#define STATFS4
-#define NO_FSYNC
-#define HAVE_PATHCONF
-#define NO_GETRLIMIT
-#endif /* SCO */
-
-
-
-/* Definitions for RiscIX */
-#ifdef RiscIX
-#define SIGNAL_CAST (void (*)(int))
-#include <sys/dirent.h>
-#include <sys/acct.h>
-#include <sys/vfs.h>
-#include <string.h>
-#include <utime.h>
-#include <signal.h>
-#define HAVE_GETTIMEOFDAY
-#define NOSTRCASECMP
-#define NOSTRDUP
#endif
-
-
-#ifdef ISC
-#include <net/errno.h>
-#include <string.h>
-#include <sys/dir.h>
-#include <dirent.h>
-#include <sys/statfs.h>
-#include <fcntl.h>
-#include <sys/sioctl.h>
-#include <stropts.h>
-#include <limits.h>
-#include <netinet/tcp.h>
-#define FIONREAD FIORDCHK
-#define SYSV
-#define USE_WAITPID
-#define SIGNAL_CAST (void (*)(int))
-#define USE_GETCWD
-#define USE_SETSID
-#define USE_IFREQ
-#define NO_FTRUNCATE
-#define STATFS4
-#define NO_FSYNC
-#endif
-
-
-
-#ifdef AUX
-#include <fstab.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/vfs.h>
-#include <fcntl.h>
-#include <termios.h>
-#define SYSV
-#define USE_WAITPID
-#define SIGNAL_CAST (void (*)(int))
-char *strdup (char *);
-#define USE_GETCWD
+#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_SHARED_MMAP
+#include <sys/mman.h>
#endif
-
-#ifdef M88K_R3
-#include <string.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <termios.h>
-#define STATFS4
-#define SYSV
-#define USE_WAITPID
-#define SIGNAL_CAST (void (*)(int))
-char *strdup (char *);
-#define USE_GETCWD
-#define NO_FSYNC
-#define NO_EID
+#ifdef HAVE_SYSV_IPC
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/sem.h>
#endif
-
-#ifdef DNIX
-#include <dirent.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/statfs.h>
-#include <sys/stropts.h>
-#define NO_GET_BROADCAST
-#define USE_WAITPID
-#define USE_GETCWD
-#define USE_SETSID
-#define STATFS4
-#define NO_EID
-#define PF_INET AF_INET
-#define NO_STRERROR
-#define ftruncate(f,l) chsize(f,l)
-#endif /* DNIX */
-
-#ifdef CONVEX
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <dirent.h>
-#include <string.h>
-#include <sys/vfs.h>
-#include <fcntl.h>
-#define DONT_REINSTALL_SIG
-#define USE_SIGBLOCK
-#define USE_WAITPID
-#define SIGNAL_CAST (_SigFunc_Ptr_t)
-#define NO_GETSPNAM
-#define HAVE_MEMMOVE
-extern char *mktemp(char *);
-extern int fsync(int);
-extern int seteuid(uid_t);
-extern int setgroups(int, int *);
-extern int initgroups(char *, int);
-extern int statfs(char *, struct statfs *);
-extern int setegid(gid_t);
-extern int getopt(int, char *const *, const char *);
-extern int chroot(char *);
-extern int gettimeofday(struct timeval *, struct timezone *);
-extern int gethostname(char *, int);
-extern char *crypt(char *, char *);
-extern char *getpass(char *);
-#endif
-
-
-#ifdef CRAY
-#define MAXPATHLEN 1024
-#include <dirent.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/statfs.h>
-#define SIGNAL_CAST (void (*)(int))
-#define SIGCLD_IGNORE
-#define HAVE_FCNTL_LOCK 1
-#define USE_SETSID
-#define STATFS4
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
#endif
-#ifdef ALTOS
-#include <unistd.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/fcntl.h>
-#include <sys/statfs.h>
-#define const
-#define uid_t int
-#define gid_t int
-#define mode_t int
-#define ptrdiff_t int
-#define HAVE_GETGRNAM 0
-#define NO_EID
-#define NO_FSYNC
-#define NO_FTRUNCATE
-#define NO_GETRLIMIT
-#define NO_INITGROUPS
-#define NO_SELECT
-#define NO_SETGROUPS
-#define NO_STRERROR
-#define NO_STRFTIME
-#define NO_TM_NAME
-#define NO_UTIMEH
-#define NOSTRCASECMP
-#define REPLACE_MKTIME
-#define REPLACE_RENAME
-#define REPLACE_STRSTR
-#define STATFS4
-#define USE_GETCWD
-#endif
-
-#ifdef QNX
-#include <arpa/inet.h>
-#define STATFS4
-#include <sys/statfs.h>
-/* Override QNX size of 32 to be 255 */
-#define FD_SETSIZE 255
-#include <sys/select.h>
-#include <signal.h>
-#include <sys/dir.h>
-#define SIGNAL_CAST (void (*)())
-#define USE_WAITPID
-#define NO_INITGROUPS
-#define NO_SETGROUPS
-#define HAVE_TIMEZONE
-#define USE_GETCWD
-#define USE_SETSID
-#define HAVE_FCNTL_LOCK 1
-#define DEFAULT_PRINTING PRINT_QNX
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
#endif
-
-#ifdef NEWS42
-#include <string.h>
-#include <dirent.h>
+#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
-#include <sys/timeb.h>
-typedef int mode_t;
-#endif
-
-#ifdef OS2
-#include <dirent.h>
-#include <sys/statfs.h>
-#include <string.h>
-#include <limits.h>
-#define SIGNAL_CAST (void (*)())
-#define HAVE_FCNTL_LOCK 0
-#define USE_WAITPID
-#define NO_GET_BROADCAST
-#define NO_EID
-#define NO_SETGROUPS
-#define NO_INITGROUPS
-#define NO_CRYPT
-#define NO_STATFS
-#define NO_CHROOT
-#define NO_CHOWN
-#define strcasecmp stricmp
-#define strncasecmp strnicmp
-#endif
-
-
-#ifdef LYNX
-#define SIGNAL_CAST (void (*)())
-#define WAIT3_CAST1 (union wait *)
-#define STATFS4
-#include <fcntl.h>
-#include <resource.h>
-#include <stat.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/statfs.h>
-#define USE_GETCWD
-#define USE_GETSID
-#endif
-
-
-#ifdef BOS
-#define SIGNAL_CAST (void (*)(int))
-#include <string.h>
-#include <sys/dir.h>
-#include <sys/select.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/statfs.h>
-#include <sys/bsdioctl.h>
-#endif
-
-#ifdef AMIGA
-#include <arpa/inet.h>
-#include <dirent.h>
-#include <string.h>
-#include <netinet/tcp.h>
-#include <sys/acct.h>
-#include <sys/fcntl.h>
-#include <sys/filio.h>
-#include <sys/sockio.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <sys/termios.h>
-#include <limits.h>
-#include <sys/timeb.h>
-
-#define SIGNAL_CAST (void (*)(int))
-#define USE_GETCWD
-#define HAVE_BZERO
-#define HAVE_MEMMOVE
-#define USE_SIGPROCMASK
-#define USE_WAITPID
-#define USE_DIRECT
-#define USE_F_FSIZE
-#define HAVE_FCNTL_LOCK 0
-#define HAVE_GETTIMEOFDAY
-#define HAVE_PATHCONF
-
-#define HAVE_NO_PROC
-#define NO_FORK_DEBUG
-#define HAVE_FORK 0
-#define HAVE_VFORK 1
-#endif
-
-/* For UnixWare 2.x's ia_uinfo routines. (tangent@cyberport.com) */
-#ifdef IA_UINFO
-#include <iaf.h>
-#include <ia.h>
-#endif
-
-
-/*******************************************************************
-end of the platform specific sections
-********************************************************************/
-
-#if (!defined(USE_LDAP_DB) && !defined(USE_NISPLUS_DB))
-#define USE_SMBPASS_DB
-#endif
-
-#if defined(USE_MMAP) || defined(FAST_SHARE_MODES)
-#include <sys/mman.h>
#endif
-#ifdef SecureWare
-#define NEED_AUTH_PARAMETERS
+#ifdef HAVE_SYS_FS_S5PARAM_H
+#include <sys/fs/s5param.h>
#endif
-#ifdef REPLACE_GETPASS
-extern char *getsmbpass(char *);
-#define getpass(s) getsmbpass(s)
+#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY)
+#include <sys/filsys.h>
#endif
-#ifdef REPLACE_INNETGR
-#define innetgr(group,host,user,dom) InNetGr(group,host,user,dom)
+#ifdef HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
#endif
-#ifndef FD_SETSIZE
-#define FD_SETSIZE 255
+#ifdef HAVE_DUSTAT_H
+#include <sys/dustat.h>
#endif
-#ifndef __STDC__
-#define const
-#endif
-
-/* Now for some other grungy stuff */
-#if defined(NO_GETSPNAM) && !defined(QNX)
-struct spwd { /* fake shadow password structure */
- char *sp_pwdp;
-};
-#endif
-
-#ifndef HAVE_BZERO
-#ifndef bzero
-#define bzero(p,s) memset(p,0,s)
-#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
#endif
-#ifndef HAVE_MEMMOVE
-#ifndef memmove
-#define memmove(d,s,n) MemMove(d,s,n)
-#endif
+#ifdef HAVE_SHADOW_H
+#include <shadow.h>
#endif
-#ifdef USE_DIRECT
-#include <sys/dir.h>
-#endif
+#ifdef HAVE_SYS_SECURITY_H
+#include <sys/security.h>
+#include <prot.h>
+#define PASSWORD_LENGTH 16
+#endif /* HAVE_SYS_SECURITY_H */
-/* some unixes have ENOTTY instead of TIOCNOTTY */
-#ifndef TIOCNOTTY
-#ifdef ENOTTY
-#define TIOCNOTTY ENOTTY
-#endif
+#ifdef HAVE_COMPAT_H
+#include <compat.h>
#endif
-#ifndef SIGHUP
-#define SIGHUP 1
+#ifndef uchar
+#define uchar unsigned char
#endif
-/* if undefined then use bsd or sysv printing */
-#ifndef DEFAULT_PRINTING
-#ifdef SYSV
-#define DEFAULT_PRINTING PRINT_SYSV
+#ifdef HAVE_UNSIGNED_CHAR
+#define schar signed char
#else
-#define DEFAULT_PRINTING PRINT_BSD
-#endif
+#define schar char
#endif
-/* This defines the name of the printcap file. It is MOST UNLIKELY that
- this will change BUT! Specifying a file with the format of a printcap
- file but containing only a subset of the printers actually in your real
- printcap file is a quick-n-dirty way to allow dynamic access to a subset
- of available printers.
-*/
-#ifndef PRINTCAP_NAME
-#ifdef AIX
-#define PRINTCAP_NAME "/etc/qconfig"
-#elif defined(SYSV)
-#define PRINTCAP_NAME "lpstat"
-#else
-#define PRINTCAP_NAME "/etc/printcap"
+#ifndef int32
+#if (SIZEOF_INT == 4)
+#define int32 int
+#elif (SIZEOF_LONG == 4)
+#define int32 long
+#elif (SIZEOF_SHORT == 4)
+#define int32 short
#endif
#endif
-
-#ifdef USE_SYSV_IPC
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <sys/shm.h>
-#ifdef NO_SEMUN
-union semun {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
-};
-#endif
-#if defined(HPUX) && defined(HPUX10)
-#ifdef SEMMSL
-#undef SEMMSL
-#endif /* SEMMSL */
-#endif /* HPUX && HPUX10 */
-#endif
-
-#ifdef AFS_AUTH
-#include <afs/stds.h>
-#include <afs/kautils.h>
-#endif
-
-#ifdef DFS_AUTH
-#include <dce/dce_error.h>
-#include <dce/sec_login.h>
+#ifndef uint32
+#define uint32 unsigned int32
#endif
-#ifdef KRB5_AUTH
-#include <krb5.h>
+#ifndef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
-#ifdef KRB4_AUTH
-#include <krb.h>
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
-#ifdef NO_UTIMBUF
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-#endif
-
-#ifdef NO_STRERROR
-#ifndef strerror
+#ifndef HAVE_STRERROR
extern char *sys_errlist[];
#define strerror(i) sys_errlist[i]
#endif
-#endif
-#ifndef perror
-#define perror(m) printf("%s: %s\n",m,strerror(errno))
+#ifndef HAVE_STRCHR
+# define strchr index
+# define strrchr rindex
#endif
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 255
+#ifndef HAVE_ERRNO_DECL
+extern int errno;
#endif
+
/* Lists, trees, caching, datbase... */
#include "ubi_sLinkList.h"
#include "ubi_dLinkList.h"
@@ -1258,157 +311,144 @@ extern char *sys_errlist[];
/***** automatically generated prototypes *****/
#include "proto.h"
+#ifdef strcpy
+#undef strcpy
+#endif /* strcpy */
+#define strcpy(dest,src) __ERROR__XX__NEVER_USE_STRCPY___;
+#ifdef strcat
+#undef strcat
+#endif /* strcat */
+#define strcat(dest,src) __ERROR__XX__NEVER_USE_STRCAT___;
-#ifndef S_IFREG
-#define S_IFREG 0100000
-#endif
+#ifdef sprintf
+#undef sprintf
+#endif /* sprintf */
+#define sprintf __ERROR__XX__NEVER_USE_SPRINTF__;
-#ifndef S_ISREG
-#define S_ISREG(x) ((S_IFREG & (x))!=0)
-#endif
+#define pstrcpy(d,s) safe_strcpy((d),(s),sizeof(pstring)-1)
+#define pstrcat(d,s) safe_strcat((d),(s),sizeof(pstring)-1)
+#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
+#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
-#ifndef S_ISDIR
-#define S_ISDIR(x) ((S_IFDIR & (x))!=0)
+#ifdef __COMPAR_FN_T
+#define QSORT_CAST (__compar_fn_t)
#endif
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(x) ((S_IFLNK & (x))!=0)
+#ifndef QSORT_CAST
+#define QSORT_CAST (int (*)(const void *, const void *))
#endif
-#ifdef UFC_CRYPT
-#define crypt ufc_crypt
+/* this guess needs to be improved (tridge) */
+#if defined(HAVE_STATVFS) && !defined(SYSV)
+#define SYSV 1
#endif
-#ifdef REPLACE_STRLEN
-#define strlen(s) Strlen(s)
+#ifndef DEFAULT_PRINTING
+#ifdef SYSV
+#define DEFAULT_PRINTING PRINT_SYSV
+#else
+#define DEFAULT_PRINTING PRINT_BSD
#endif
-
-#ifdef REPLACE_STRSTR
-#define strstr(s,p) Strstr(s,p)
#endif
-#ifdef REPLACE_MKTIME
-#define mktime(t) Mktime(t)
+#ifndef SIGCLD
+#define SIGCLD SIGCHLD
#endif
-#ifndef NGROUPS_MAX
-#define NGROUPS_MAX 128
+#if (defined(HAVE_SYSV_IPC) || defined(HAVE_SHARED_MMAP))
+#define FAST_SHARE_MODES 1
#endif
-#ifndef EDQUOT
-#define EDQUOT ENOSPC
+#ifndef MAP_FILE
+#define MAP_FILE 0
#endif
-#ifndef HAVE_GETGRNAM
-#define HAVE_GETGRNAM 1
+#ifdef HAVE_SYSV_IPC
+#ifndef HAVE_UNION_SEMUN
+union semun {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+};
#endif
-
-#ifndef SOL_TCP
-#define SOL_TCP 6
#endif
-/* default to using ftruncate workaround as this is safer than assuming
-it works and getting lots of bug reports */
-#ifndef FTRUNCATE_CAN_EXTEND
-#define FTRUNCATE_CAN_EXTEND 0
+#if (!defined(WITH_NISPLUS) && !defined(WITH_LDAP))
+#define USE_SMBPASS_DB 1
#endif
-/* maybe this unix doesn't separate RD and WR locks? */
-#ifndef F_RDLCK
-#define F_RDLCK F_WRLCK
+#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
+#define OSF1_ENH_SEC 1
#endif
-#ifndef ENOTSOCK
-#define ENOTSOCK EINVAL
+#if defined(HAVE_PAM_AUTHENTICATE) && defined(HAVE_SECURITY_PAM_APPL_H)
+#define HAVE_PAM 1
#endif
-#ifndef SIGCLD
-#define SIGCLD SIGCHLD
-#endif
+#if defined(HAVE_YP_GET_DEFAULT_DOMAIN)
+#define HAVE_NETGROUP 1
+#endif
-#ifndef MAP_FILE
-#define MAP_FILE 0
+#ifndef ALLOW_CHANGE_PASSWORD
+#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
+#define ALLOW_CHANGE_PASSWORD 1
+#endif
#endif
-#ifndef HAVE_FCNTL_LOCK
-#define HAVE_FCNTL_LOCK 1
+/* 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 WAIT3_CAST2
-#define WAIT3_CAST2 (struct rusage *)
+
+#ifndef HAVE_PIPE
+#define SYNC_DNS 1
#endif
-#ifndef WAIT3_CAST1
-#define WAIT3_CAST1 (int *)
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 256
#endif
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)())
+#ifndef SEEK_SET
+#define SEEK_SET 0
#endif
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK 0x7f000001
-#endif /* INADDR_LOOPBACK */
-
-/* this is a rough check to see if this machine has a lstat() call.
- it is not guaranteed to work */
-#if !defined(S_ISLNK)
-#define lstat stat
#endif
-/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
-#ifndef errno
-extern int errno;
-#endif
-
-
-#ifdef NO_EID
-#define geteuid() getuid()
-#define getegid() getgid()
-#define seteuid(x) setuid(x)
-#define setegid(x) setgid(x)
+#ifndef HAVE_CRYPT
+#define crypt ufc_crypt
#endif
+#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
+#define ULTRIX_AUTH 1
+#endif
-#if (HAVE_FCNTL_LOCK == 0)
-/* since there is no locking available, system includes */
-/* for DomainOS 10.4 do not contain any of the following */
-/* #define's. So, to satisfy the compiler, add these */
-/* #define's, although they arn't really necessary. */
-#define F_GETLK 0
-#define F_SETLK 0
-#define F_WRLCK 0
-#define F_UNLCK 0
-#endif /* HAVE_FCNTL_LOCK == 0 */
-
-#ifdef NOSTRCASECMP
-#define strcasecmp(s1,s2) StrCaseCmp(s1,s2)
-#define strncasecmp(s1,s2,n) StrnCaseCmp(s1,s2,n)
+#ifndef HAVE_STRDUP
+char *strdup(const char *s);
#endif
-#ifdef strcpy
-#undef strcpy
-#endif /* strcpy */
-#define strcpy(dest,src) __ERROR__XX__NEVER_USE_STRCPY___;
+#ifndef HAVE_MEMMOVE
+void *memmove(void *dest,const void *src,int size);
+#endif
-#ifdef strcat
-#undef strcat
-#endif /* strcat */
-#define strcat(dest,src) __ERROR__XX__NEVER_USE_STRCAT___;
+#ifndef HAVE_INITGROUPS
+int initgroups(char *name,gid_t id);
+#endif
-#ifdef sprintf
-#undef sprintf
-#endif /* sprintf */
-#define sprintf __ERROR__XX__NEVER_USE_SPRINTF__;
+#ifndef HAVE_RENAME
+int rename(const char *zfrom, const char *zto);
+#endif
-#define pstrcpy(d,s) safe_strcpy((d),(s),sizeof(pstring)-1)
-#define pstrcat(d,s) safe_strcat((d),(s),sizeof(pstring)-1)
-#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
-#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
+#ifndef HAVE_MKTIME
+time_t mktime(struct tm *t);
+#endif
-#if MEM_MAN
-#include "mem_man/mem_man.h"
-#endif /* MEM_MAN */
+#ifndef HAVE_FTRUNCATE
+int ftruncate(int f,long l);
+#endif
#endif /* _INCLUDES_H */
diff --git a/source3/include/local.h b/source3/include/local.h
index 0a369d80e2..afe1a3b1c6 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -152,12 +152,6 @@
accessible to root */
#define DUMP_CORE 1
-/* 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
-
#define SMB_ALIGNMENT 1
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 97ee483f55..523d7c9615 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -160,6 +160,10 @@ BOOL deal_with_creds(uchar sess_key[8],
DOM_CRED *sto_clnt_cred,
DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred);
+/*The following definitions come from dfree.c */
+
+int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
+
/*The following definitions come from dir.c */
void init_dptrs(void);
@@ -186,7 +190,7 @@ BOOL SeekDir(void *p,int pos);
int TellDir(void *p);
void DirCacheAdd( char *path, char *name, char *dname, int snum );
char *DirCacheCheck( char *path, char *name, int snum );
-void DirCacheFlush( int snum );
+void DirCacheFlush(int snum);
/*The following definitions come from fault.c */
@@ -1188,21 +1192,6 @@ BOOL name_map_mangle( char *OutName, BOOL need83, int snum );
void mdfour(unsigned char *out, unsigned char *in, int n);
-/*The following definitions come from mem_man/mem_man.c */
-
-void *smb_mem_malloc(size_t size,char *file,int line);
-char *smb_mem_strdup(char *s, char *file, int line);
-int smb_mem_free(void *ptr,char *file,int line);
-void smb_mem_write_info(void *ptr,FILE *outfile);
-char *smb_mem_query_file(void *ptr);
-int smb_mem_query_line(void *ptr);
-int smb_mem_test(void *ptr);
-void smb_mem_write_status(FILE *outfile);
-void smb_mem_write_verbose(FILE *outfile);
-void smb_mem_write_errors(FILE *outfile);
-void smb_mem_set_multiplier(int multiplier);
-void *smb_mem_resize(void *ptr,size_t newsize);
-
/*The following definitions come from membuffer.c */
void mem_init(struct mem_buf *buf, int margin);
@@ -1240,6 +1229,10 @@ BOOL getlmhostsent( FILE *fp, char *name, int *name_type, struct in_addr *ipaddr
void endlmhosts(FILE *fp);
BOOL resolve_name(char *name, struct in_addr *return_ip);
+/*The following definitions come from netmask.c */
+
+int get_netmask(struct in_addr *ipaddr, struct in_addr *nmask);
+
/*The following definitions come from nisppass.c */
struct passdb_ops *nisplus_initialize_password_db(void);
@@ -1742,10 +1735,6 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
/*The following definitions come from replace.c */
-char *Strstr(char *s, char *p);
-time_t Mktime(struct tm *t);
-int InNetGr(char *group,char *host,char *user,char *dom);
-void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
/*The following definitions come from reply.c */
@@ -1811,8 +1800,6 @@ int dos_chmod(int cnum,char *fname,int dosmode,struct stat *st);
int file_utime(int cnum, char *fname, struct utimbuf *times);
BOOL set_filetime(int cnum, char *fname, time_t mtime);
BOOL unix_convert(char *name,int cnum,pstring saved_last_component, BOOL *bad_path);
-int disk_free(char *path,int *bsize,int *dfree,int *dsize);
-int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
BOOL check_name(char *name,int cnum);
void sync_file(int cnum, int fnum);
void close_file(int fnum, BOOL normal_close);
@@ -1859,6 +1846,12 @@ struct shmem_ops *smb_shm_open(int ronly);
struct shmem_ops *sysv_shm_open(int ronly);
+/*The following definitions come from signal.c */
+
+void BlockSignals(BOOL block,int signum);
+void CatchSignal(int signum,void (*handler)(int ));
+void CatchChild(void);
+
/*The following definitions come from slprintf.c */
int vslprintf(char *str, int n, char *format, va_list ap);
@@ -1987,7 +1980,6 @@ char *tmpdir(void);
BOOL is_a_socket(int fd);
BOOL next_token(char **ptr,char *buff,char *sep);
char **toktocliplist(int *ctok, char *sep);
-void *MemMove(void *dest,void *src,int size);
void *mem_dup( void *from, int size );
void array_promote(char *array,int elsize,int element);
void set_socket_options(int fd, char *options);
@@ -2097,7 +2089,6 @@ struct hostent *Get_Hostbyname(char *name);
BOOL process_exists(int pid);
char *uidtoname(int uid);
char *gidtoname(int gid);
-void BlockSignals(BOOL block,int signum);
void ajt_panic(void);
char *readdirname(void *p);
BOOL is_in_path(char *name, name_compare_entry *namelist);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 3b1796f76b..1c37aab7e2 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -57,12 +57,6 @@ typedef int BOOL;
as signed and unsigned int will work.
*/
-/* afs/stds.h defines int16 and int32 */
-#ifndef AFS_AUTH
-typedef short int16;
-typedef int int32;
-#endif
-
#ifndef uint8
typedef unsigned char uint8;
#endif
@@ -71,22 +65,17 @@ typedef unsigned char uint8;
typedef unsigned short uint16;
#endif
-#ifndef uint32
-typedef unsigned int uint32;
-#endif
-
#ifndef uchar
#define uchar unsigned char
#endif
+
#ifndef int16
#define int16 short
#endif
+
#ifndef uint16
#define uint16 unsigned short
#endif
-#ifndef uint32
-#define uint32 unsigned int
-#endif
#define SIZEOFWORD 2
@@ -94,11 +83,15 @@ typedef unsigned int uint32;
#define DEF_CREATE_MASK (0755)
#endif
+#ifndef PRINTCAP_NAME
+#define PRINTCAP_NAME "/etc/printcap"
+#endif
+
/* how long to wait for secondary SMB packets (milli-seconds) */
#define SMB_SECONDARY_WAIT (60*1000)
/* debugging code */
-#ifndef SYSLOG
+#if !defined(WITH_SYSLOG) || defined(NO_SYSLOG)
#define DEBUG(level,body) ((DEBUGLEVEL>=(level))?(Debug1 body):0)
#define DEBUGLVL(level) (DEBUGLEVEL>=(level))
#else
@@ -1149,7 +1142,7 @@ struct parm_struct
#define ERRHRD 0x03 /* Error is an hardware error. */
#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
-#ifdef __STDC__
+#ifdef HAVE_STDARG_H
int Debug1(char *, ...);
int slprintf(char *str, int n, char *format, ...);
#else
@@ -1157,7 +1150,7 @@ int Debug1();
int slprintf();
#endif
-#ifdef DFS_AUTH
+#ifdef WITH_DFS
void dfs_unlogin(void);
extern int dcelogin_atmost_once;
#endif
@@ -1170,14 +1163,6 @@ void ajt_panic(void);
char *strdup(char *s);
#endif
-#ifdef REPLACE_STRLEN
-int Strlen(char *);
-#endif
-
-#ifdef REPLACE_STRSTR
-char *Strstr(char *s, char *p);
-#endif
-
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
@@ -1190,7 +1175,7 @@ char *Strstr(char *s, char *p);
#endif
#ifndef SIGNAL_CAST
-#define SIGNAL_CAST
+#define SIGNAL_CAST (RETSIGTYPE (*)())
#endif
#ifndef SELECT_CAST
@@ -1330,10 +1315,10 @@ enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_SAMB
/* case handling */
enum case_handling {CASE_LOWER,CASE_UPPER};
-#ifdef USE_SSL
+#ifdef WITH_SSL
/* SSL version options */
enum ssl_version_enum {SMB_SSL_V2,SMB_SSL_V3,SMB_SSL_V23,SMB_SSL_TLS1};
-#endif /* USE_SSL */
+#endif /* WITH_SSL */
/* Macros to get at offsets within smb_lkrng and smb_unlkrng
structures. We cannot define these as actual structures