#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
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 */
#include "kanji.h"
#include "charset.h"
+#include "nterr.h"
+
#ifndef MAXCODEPAGELINES
#define MAXCODEPAGELINES 256
#endif
#endif
/* this guess needs to be improved (tridge) */
-#if defined(HAVE_STATVFS) && !defined(SYSV)
+#if defined(STAT_STATVFS) && !defined(SYSV)
#define SYSV 1
#endif
#define PASSWORD_LENGTH 8
#endif
+#ifdef REPLACE_INET_NTOA
+#define inet_ntoa rep_inet_ntoa
+#endif
#ifndef HAVE_PIPE
#define SYNC_DNS 1
#define INADDR_LOOPBACK 0x7f000001
#endif
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
#ifndef HAVE_CRYPT
#define crypt ufc_crypt
#endif
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 */