includes.h: Added USE_SETSID for SGI.
[kai/samba.git] / source3 / include / includes.h
index 55423dc431959ce83dc6c3dd81977d8c0022f88f..7403fc4b641393cd8c8a07f08ddc57186b886f30 100644 (file)
@@ -4,7 +4,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Machine customisation and include handling
-   Copyright (C) Andrew Tridgell 1994-1995
+   Copyright (C) Andrew Tridgell 1994-1997
    
    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
 #endif
 
 #include <sys/socket.h>
+#ifdef AXPROC
+#include <termio.h>
+#endif
 #include <sys/ioctl.h>
 #include <stddef.h>
 #ifdef POSIX_H
 #endif
 #endif
 
-#if USE_MMAP
-#include <sys/mman.h>
-#endif
-
 #if defined(GETPWANAM)
 #include <sys/types.h>
 #include <sys/label.h>
 #include <pwdadj.h>
 #endif
 
-#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(CONVEX)
+#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(FreeBSD) && !defined(CONVEX)
 #include <shadow.h>
 #endif
 
@@ -223,15 +222,22 @@ Here come some platform specific sections
 #define USE_SETSID
 #define HAVE_BZERO
 #define HAVE_MEMMOVE
+#define USE_SIGPROCMASK
+#define USE_WAITPID
+#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))
@@ -253,9 +259,21 @@ typedef unsigned short mode_t;
 #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
+#endif
+/* SunOS doesn't have POSIX atexit */
+#define atexit on_exit
+#endif
 
 
 #ifdef SUNOS5
@@ -272,8 +290,10 @@ typedef unsigned short mode_t;
 #include <string.h>
 #include <arpa/inet.h>
 #include <rpcsvc/ypclnt.h>
-#include <crypt.h> 
 #include <termios.h>
+#ifndef USE_LIBDES
+#include <crypt.h>
+#endif /* USE_LIBDES */
 extern int gettimeofday (struct timeval *, void *);
 extern int gethostname (char *name, int namelen);
 extern int innetgr (const char *, const char *, const char *, const char *);
@@ -288,6 +308,7 @@ extern int innetgr (const char *, const char *, const char *, const char *);
 #define USE_GETCWD
 #define USE_SETSID
 #define REPLACE_GETPASS
+#define USE_SIGPROCMASK
 #endif
 
 
@@ -305,6 +326,7 @@ char *getwd(char *);
 #define SIGNAL_CAST (void(*)(int))
 #endif
 #define USE_DIRECT
+#define USE_WAITPID
 #endif
 
 #ifdef SGI
@@ -319,9 +341,11 @@ char *getwd(char *);
 #define STATFS4
 #define USE_WAITPID
 #define USE_DIRECT
+#define USE_SETSID
 #endif
 
 #ifdef SGI5
+#include <arpa/inet.h>
 #include <netinet/tcp.h>
 #include <sys/statvfs.h>
 #include <string.h>
@@ -335,6 +359,7 @@ char *getwd(char *);
 #define SIGNAL_CAST (void (*)())
 #define USE_STATVFS
 #define USE_WAITPID
+#define USE_SETSID
 #endif
 
 
@@ -405,6 +430,7 @@ char *mktemp(char *); /* No standard include */
 #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>
@@ -457,12 +483,22 @@ char *mktemp(char *); /* No standard include */
 
 
 #ifdef FreeBSD
+#include <arpa/inet.h>
 #include <strings.h>
 #include <netinet/tcp.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #define SIGNAL_CAST (void (*)())
+#define USE_SETVBUF
+#define USE_SETSID
+#define USE_GETCWD
+#define USE_WAITPID
 #define USE_DIRECT
+#define HAVE_MEMMOVE
+#define HAVE_BZERO
+#define HAVE_GETTIMEOFDAY
+#define HAVE_PATHCONF
+#define HAVE_GETGRNAM 1
 #endif 
 
 
@@ -477,8 +513,10 @@ char *mktemp(char *); /* No standard include */
 #include <sys/id.h>
 #include <sys/priv.h>
 #include <netinet/tcp.h>
+#include <locale.h>
 #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. */
@@ -529,7 +567,12 @@ char *mktemp(char *); /* No standard include */
 #define NO_EID
 #define STATFS4
 #define USE_DIRECT
+#ifdef PTX4
+#undef USE_DIRECT
 #endif
+#endif
+
+
 
 #ifdef SEQUENT_PTX4
 #include <string.h>
@@ -584,6 +627,7 @@ char *mktemp(char *); /* No standard include */
 #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
@@ -616,6 +660,7 @@ char *mktemp(char *); /* No standard include */
 #include <sys/statfs.h>
 #include <sys/stropts.h>
 #include <limits.h>
+#include <locale.h>
 #ifdef EVEREST
 #include <unistd.h> 
 #endif
@@ -878,10 +923,60 @@ typedef int mode_t;
 #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
+
+
 /*******************************************************************
 end of the platform specific sections
 ********************************************************************/
 
+#if defined(USE_MMAP) || defined(FAST_SHARE_MODES)
+#include <sys/mman.h>
+#endif
+
 #ifdef SecureWare
 #define NEED_AUTH_PARAMETERS
 #endif
@@ -1051,6 +1146,10 @@ it works and getting lots of bug reports */
 #define SIGCLD SIGCHLD
 #endif 
 
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif
+
 #ifndef HAVE_FCNTL_LOCK
 #define HAVE_FCNTL_LOCK 1
 #endif