It occurred to me that the samba includes.h file should be included in the
[samba.git] / source3 / include / includes.h
index e6dee108a588de6c4592fbea8e110cec2bbc2621..5054c2ee5bf7e387813eaaf811de6281046ff937 100644 (file)
 #ifdef POSIX_H
 #include <bsd/net/if.h>
 #else
+#ifdef OSF1
+#include <net/route.h>
+#include <sys/mbuf.h>
+#endif
 #include <net/if.h>
 #endif
 #endif
 #include <syslog.h>
 #endif
 
+#ifdef HAVE_REGEX_H
+#include <regex.h>
+#endif
 
 
 /***************************************************************************
@@ -222,11 +229,15 @@ Here come some platform specific sections
 #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
@@ -252,6 +263,7 @@ Here come some platform specific sections
 #include <sys/acct.h>
 #include <sys/vfs.h>
 #include <string.h>
+#include <strings.h>
 #include <errno.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -280,6 +292,7 @@ typedef unsigned short mode_t;
 #define USE_SYSV_IPC
 /* SunOS doesn't have POSIX atexit */
 #define atexit on_exit
+#define NOSTRCASECMP
 #endif
 
 
@@ -321,6 +334,9 @@ extern int innetgr (const char *, const char *, const char *, const char *);
 #define REPLACE_GETPASS
 #endif /* REPLACE_GETPASS */
 #define USE_SIGPROCMASK
+#ifndef QSORT_CAST
+#define QSORT_CAST (int (*)(const void *, const void *))
+#endif /* QSORT_CAST */
 #endif
 
 
@@ -376,6 +392,9 @@ char *getwd(char *);
 #define USE_WAITPID
 #define USE_SETSID
 #define USE_SYSV_IPC
+#ifndef QSORT_CAST
+#define QSORT_CAST (int (*)(const void *, const void *))
+#endif /* QSORT_CAST */
 #endif
 
 
@@ -517,12 +536,13 @@ char *mktemp(char *); /* No standard include */
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <termios.h>
+#include <fcntl.h>
 #if __FreeBSD__ >= 3
 #include <dirent.h>
 #else
 #define USE_DIRECT
 #endif
-#define SIGNAL_CAST (void (*)())
+#define SIGNAL_CAST (void (*)(int))
 #define USE_SETVBUF
 #define USE_SETSID
 #define USE_GETCWD
@@ -532,7 +552,16 @@ char *mktemp(char *); /* No standard include */
 #define HAVE_GETTIMEOFDAY
 #define HAVE_PATHCONF
 #define HAVE_GETGRNAM 1
-#endif 
+#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>
@@ -590,7 +619,10 @@ char *mktemp(char *); /* No standard include */
 #define NEED_AUTH_PARAMETERS
 #endif
 #define SIGNAL_CAST (void (*)(__harg))
-#ifndef HPUX10 /* This is only needed for HPUX 9.x */
+#ifdef HPUX10
+#include <stropts.h>
+#else /* HPUX10 */  
+/* This is only needed for HPUX 9.x */
 #define SELECT_CAST (int *)
 #endif /* HPUX10 */
 #define SYSV
@@ -678,7 +710,6 @@ char *mktemp(char *); /* No standard include */
 #include <strings.h>
 #include <sys/dir.h>
 #include <sys/vfs.h>
-#define bzero(b,len) memset(b,0,len)
 #define NO_UTIMBUF
 #include <libc.h>
 #define NOSTRDUP
@@ -690,6 +721,7 @@ char *mktemp(char *); /* No standard include */
 #define SIGNAL_CAST (void (*)(int))
 #define WAIT3_CAST1 (union wait *)
 #define HAVE_GMTOFF
+#define O_NONBLOCK O_NDELAY
 #endif
 
 
@@ -1036,6 +1068,10 @@ typedef int mode_t;
 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
@@ -1132,6 +1168,11 @@ union semun {
        unsigned short *array;
 };
 #endif
+#if defined(HPUX) && defined(HPUX10)
+#ifdef SEMMSL
+#undef SEMMSL
+#endif /* SEMMSL */
+#endif /* HPUX && HPUX10 */
 #endif
 
 #ifdef AFS_AUTH
@@ -1177,7 +1218,6 @@ extern char *sys_errlist[];
 #include "version.h"
 #include "smb.h"
 #include "nameserv.h"
-#include "ubiqx/ubi_dLinkList.h"
 
 #include "byteorder.h"
 
@@ -1320,12 +1360,40 @@ extern int errno;
 #define strncasecmp(s1,s2,n) StrnCaseCmp(s1,s2,n)
 #endif
 
-#ifndef strcpy
-#define strcpy(dest,src) StrCpy(dest,src)
-#endif
+#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___;
+
+#ifdef sprintf
+#undef sprintf
+#endif /* sprintf */
+#define sprintf __ERROR__XX__NEVER_USE_SPRINTF__;
+
+#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)
 
 #if MEM_MAN
 #include "mem_man/mem_man.h"
-#endif
+#endif /* MEM_MAN */
 
-#endif
+
+/* -------------------------------------------------------------------------- **
+ * Lists, trees, and caching...
+ */
+#include "ubiqx/ubi_sLinkList.h"
+#include "ubiqx/ubi_dLinkList.h"
+
+#ifndef UBI_BINTREE_H
+#include "ubiqx/ubi_SplayTree.h"
+#include "ubiqx/ubi_Cache.h"
+#endif /* UBI_BINTREE_H */
+
+#endif /* _INCLUDES_H */