#ifndef BASE_SYSTEMS_H
#define BASE_SYSTEMS_H
#include <inttypes.h>
#ifndef NOINTNSAPI
#define INTNSAPI
#endif
#define DAEMON_ANY
#define DAEMON_STATS
typedef int PRBool;
#define PR_TRUE 1
#define PR_FALSE 0
typedef int WSBool;
#define WS_TRUE 1
#define WS_FALSE 0
#if defined(AIX)
#define HAS_IPV6
#define AUTH_DBM
#define BSD_RLIMIT
#undef BSD_SIGNALS
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW|RTLD_GLOBAL
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATFS
#define HAVE_ATEXIT
#define HAVE_STRERROR_R
#define HAVE_STRTOK_R
#define HAVE_TIME_R 2
#define HAVE_STRFTIME
#define JAVA_STATIC_LINK
#undef NEED_CRYPT_H
#define NEED_STRINGS_H
#define NET_SOCKETS
#define SA_HANDLER_T(x) (void (*)(int))x
#ifdef NS_OLDES3X
#define SA_NOCLDWAIT 0
#endif
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#ifdef HW_THREADS
#define THREAD_ANY
#endif
#elif defined(BSDI)
#define AUTH_DBM
#define BSD_MAIL
#define BSD_RLIMIT
#define BSD_SIGNALS
#define BSD_TIME
#define DAEMON_UNIX_MOBRULE
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS (MAP_FILE | MAP_SHARED)
#define HAS_STATFS
#define HAVE_ATEXIT
#undef NEED_CRYPT_PROTO
#define NET_SOCKETS
#define NO_DOMAINNAME
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#define JAVA_STATIC_LINK
#elif defined(HPUX)
#define HAVE_TIME_R 2
#define AUTH_DBM
#undef BSD_RLIMIT
#undef BSD_SIGNALS
#ifdef MCC_PROXY
#define DAEMON_NEEDS_SEMAPHORE
#else
#define DAEMON_NEEDS_SEMAPHORE
#endif
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_HPSHL
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_PRIVATE
#define HAS_STATFS
#define HAVE_ATEXIT
#define HAVE_STRFTIME
#define JAVA_STATIC_LINK
#undef NEED_CRYPT_H
#define NET_SOCKETS
#define SA_HANDLER_T(x) (void (*)(int))x
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_FILE | MAP_VARIABLE | MAP_SHARED
#elif defined (IRIX)
#define AUTH_DBM
#define BSD_RLIMIT
#undef BSD_SIGNALS
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define HAVE_STRTOK_R
#define HAVE_TIME_R 2
#define JAVA_STATIC_LINK
#define NEED_CRYPT_H
#define NET_SOCKETS
#define SA_HANDLER_T(x) (void (*)(int))x
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#define THROW_HACK throw()
#elif defined(Linux)
#define HAS_IPV6
#define AUTH_DBM
#define BSD_RLIMIT
#undef BSD_SIGNALS
#define DAEMON_NEEDS_SEMAPHORE
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define HAVE_STRTOK_R
#define HAVE_TIME_R 2
#define NEED_CRYPT_H
#undef NEED_FILIO
#define NEED_GHN_PROTO
#define NET_SOCKETS
#define SA_HANDLER_T(x) (void (*)(int))x
#undef NEED_GHN_PROTO
#elif defined(NCR)
#define AUTH_DBM
#undef BSD_RLIMIT
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define HAVE_STRTOK_R
#define JAVA_STATIC_LINK
#define NEED_CRYPT_H
#define NEED_FILIO
#define NEED_GHN_PROTO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#elif defined(NEC)
#define DNS_CACHE
#define AUTH_DBM
#undef BSD_RLIMIT
#define DAEMON_NEEDS_SEMAPHORE
#define DAEMON_UNIX_MOBRULE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DLL_CAPABLE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define HAVE_STRTOK_R
#define HAVE_TIME_R 2
#define JAVA_STATIC_LINK
#define NEED_CRYPT_H
#define NEED_FILIO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#elif defined(OSF1)
#define HAS_IPV6
#define AUTH_DBM
#define BSD_RLIMIT
#undef BSD_SIGNALS
#define BSD_TIME
#define DAEMON_UNIX_MOBRULE
#define DAEMON_NEEDS_SEMAPHORE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAVE_ATEXIT
#define HAVE_STRFTIME
#define HAVE_TIME_R 2
#define NET_SOCKETS
#define SA_HANDLER_T(x) (void (*)(int))x
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#elif defined(SCO)
#define AUTH_DBM
#undef BSD_RLIMIT
#undef BSD_SIGNALS
#define DAEMON_NEEDS_SEMAPHORE
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#undef NEED_CRYPT_H
#undef NEED_FILIO
#undef NEED_GHN_PROTO
#undef NEED_SETEID_PROTO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#define SA_HANDLER_T(x) (void (*)(int))x
#elif defined(SNI)
#define AUTH_DBM
#undef BSD_RLIMIT
#define DAEMON_NEEDS_SEMAPHORE
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define JAVA_STATIC_LINK
#define NEED_CRYPT_H
#define NEED_FILIO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#define USE_PIPE
#elif defined(SOLARIS)
#if defined(ENABLE_IPV6)
#define HAS_IPV6
#endif
#define AUTH_DBM
#define BSD_RLIMIT
#undef BSD_SIGNALS
#define DAEMON_NEEDS_SEMAPHORE
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW|RTLD_FIRST
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define HAVE_STRTOK_R
#define HAVE_TIME_R 3
#define NEED_CRYPT_H
#define NEED_FILIO
#define NEED_GHN_PROTO
#define NET_SOCKETS
#if OSVERSION > 504
#define SA_HANDLER_T(x) x
#endif
#if OSVERSION >= 506
#undef NEED_GHN_PROTO
#endif
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#elif defined (SONY)
#define AUTH_DBM
#undef BSD_RLIMIT
#define DAEMON_NEEDS_SEMAPHORE
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAVE_ATEXIT
#define NEED_CRYPT_H
#define NEED_FILIO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#elif defined(SUNOS4)
#define AUTH_DBM
#define BSD_MAIL
#define BSD_RLIMIT
#define BSD_SIGNALS
#define BSD_TIME
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS 1
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATFS
#undef HAVE_ATEXIT
#undef NEED_CRYPT_H
#define NEED_CRYPT_PROTO
#define NEED_FILIO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#elif defined(UNIXWARE)
#define AUTH_DBM
#undef BSD_RLIMIT
#define DAEMON_UNIX_MOBRULE
#define DLL_CAPABLE
#define DLL_DLOPEN
#define DLL_DLOPEN_FLAGS RTLD_NOW
#define DNS_CACHE
#define FILE_INHERIT_FCNTL
#define FILE_MMAP_FLAGS MAP_SHARED
#define HAS_STATVFS
#define HAVE_ATEXIT
#define NEED_CRYPT_H
#define NEED_FILIO
#define NEED_GHN_PROTO
#define NEED_SETEID_PROTO
#define NET_SOCKETS
#define SEM_FLOCK
#define SHMEM_MMAP_FLAGS MAP_SHARED
#ifndef boolean
#define boolean boolean
#endif
#elif defined (XP_WIN32)
#include <wtypes.h>
#include <winbase.h>
#define AUTH_DBM
#define DAEMON_WIN32
#define DLL_CAPABLE
#define DLL_WIN32
#define DNS_CACHE
#define LOG_BUFFERING
#define HAVE_STRFTIME
#define NEED_CRYPT_PROTO
#define NEEDS_WRITEV
#define NET_SOCKETS
#define NO_DOMAINNAME
#ifdef BUILD_DLL
#if defined (NSAPI_PUBLIC)
#undef NSAPI_PUBLIC
#endif
#define NSAPI_PUBLIC __declspec(dllexport)
#else
#if defined (NSAPI_PUBLIC)
#undef NSAPI_PUBLIC
#endif
#define NSAPI_PUBLIC
#endif
#define SEM_WIN32
#define THREAD_ANY
#define THREAD_NSPR_KERNEL
#define USE_NSPR
#define USE_STRFTIME
#define FILE_DEV_NULL "\\\\.\NUL"
#endif
#ifndef DAEMON_LISTEN_SIZE
#define DAEMON_LISTEN_SIZE 128
#endif
#ifndef NSAPI_PUBLIC
#define NSAPI_PUBLIC
#endif
#ifndef SA_HANDLER_T
#define SA_HANDLER_T(x) (void (*)())x
#endif
#ifndef THROW_HACK
#define THROW_HACK
#endif
#ifndef FILE_DEV_NULL
#define FILE_DEV_NULL "/dev/null"
#endif
#if (defined(MCC_HTTPD) || defined(MCC_ADMSERV) || defined(MCC_PROXY) || defined(NS_MAIL)) && defined(XP_UNIX)
#define USE_NSPR
#define LOG_BUFFERING
#ifdef SW_THREADS
#define THREAD_NSPR_USER
#else
#define THREAD_NSPR_KERNEL
#endif
#define THREAD_ANY
#endif
#ifndef APSTUDIO_READONLY_SYMBOLS
#ifndef NSPR_PRIO_H
#define NSPR_PRIO_H
#endif
#ifdef SEM_WIN32
typedef HANDLE SEMAPHORE;
#define SEMAPHORE_T HANDLE
#define SEM_ERROR NULL
#define SEM_MAXVALUE 32767
#elif defined(SEM_FLOCK)
#elif defined(SEM_POSIX)
#define SEM_ERROR ((void *)(-1))
typedef void* SEMAPHORE_T;
#else
#endif
#endif
#ifndef XP_CPLUSPLUS
#ifdef __cplusplus
#define XP_CPLUSPLUS
#endif
#endif
#endif