added loads of pointless rpcsvc/ and rpc/ include files, all because
[samba.git] / source / include / includes.h
index b63787fd5e3b7734ec78b83c54d6253d38d8c336..4993a29e2b828800ad21b364bd071e3353b9c82b 100644 (file)
 
 #include <sys/types.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>
 
 #include <string.h>
 #endif
 
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
 #endif
 
-#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>
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
 #endif
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
 #endif
 
 #ifdef HAVE_FCNTL_H
 #include <compat.h>
 #endif
 
+#ifdef HAVE_RPC_TYPES_H
+#include <rpc/types.h>
+#endif
+
+#ifdef HAVE_RPC_XDR_H
+#include <rpc/xdr.h>
+#endif
+
+#ifdef HAVE_RPC_AUTH_H
+#include <rpc/auth.h>
+#endif
+
+#ifdef HAVE_RPC_CLNT_H
+#include <rpc/clnt.h>
+#endif
+
+#ifdef HAVE_RPCSVC_YP_PROT_H
+#include <rpcsvc/yp_prot.h>
+#endif
+
+#ifdef HAVE_RPCSVC_YPCLNT_H
+#include <rpcsvc/ypclnt.h>
+#endif
+
 #ifndef uchar
 #define uchar unsigned char
 #endif
@@ -287,10 +324,18 @@ extern char *sys_errlist[];
 extern int errno;
 #endif
 
+#ifdef HAVE_BROKEN_GETGROUPS
+#define GID_T int
+#else
+#define GID_T gid_t
+#endif
+
 
 /* Lists, trees, caching, datbase... */
 #include "ubi_sLinkList.h"
 #include "ubi_dLinkList.h"
+#include "dlinklist.h"
+
 #ifndef UBI_BINTREE_H
 #include "ubi_Cache.h"
 #endif /* UBI_BINTREE_H */
@@ -304,6 +349,8 @@ extern int errno;
 #include "kanji.h"
 #include "charset.h"
 
+#include "nterr.h"
+
 #ifndef MAXCODEPAGELINES
 #define MAXCODEPAGELINES 256
 #endif
@@ -340,7 +387,7 @@ extern int errno;
 #endif
 
 /* this guess needs to be improved (tridge) */
-#if defined(HAVE_STATVFS) && !defined(SYSV)
+#if defined(STAT_STATVFS) && !defined(SYSV)
 #define SYSV 1
 #endif
 
@@ -402,6 +449,9 @@ union semun {
 #define PASSWORD_LENGTH 8
 #endif
 
+#ifdef REPLACE_INET_NTOA
+#define inet_ntoa rep_inet_ntoa
+#endif
 
 #ifndef HAVE_PIPE
 #define SYNC_DNS 1
@@ -419,6 +469,10 @@ union semun {
 #define INADDR_LOOPBACK 0x7f000001
 #endif
 
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
 #ifndef HAVE_CRYPT
 #define crypt ufc_crypt
 #endif
@@ -451,4 +505,14 @@ time_t mktime(struct tm *t);
 int ftruncate(int f,long l);
 #endif
 
+#if (defined(HAVE_SETRESUID) && !defined(HAVE_SETRESUID_DECL))
+/* stupid glibc */
+int setresuid(uid_t ruid, uid_t euid, uid_t suid);
+int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
+#endif
+
+#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET)
+#define bzero(a,b) memset((a),'\0',(b))
+#endif
+
 #endif /* _INCLUDES_H */