/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Consider this file as an extension to config.h, just that it contains * static text. The intention is to reduce the number of #ifdefs in the rest * of the source files without having to put all of them in AH_BOTTOM * in configure.ac. */ #ifndef CONFIG_STATIC_H #define CONFIG_STATIC_H 1 #ifdef WIN32 #define SOCKETPAIR_AF AF_INET #define get_socket_error() WSAGetLastError() extern void initialize_sockets(void); #else #define closesocket(a) close(a) #define SOCKET int #define SOCKETPAIR_AF AF_UNIX #define SOCKET_ERROR -1 #define INVALID_SOCKET -1 #define get_socket_error() errno #define initialize_sockets() #endif #ifdef HAVE_DLFCN_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_LINK_H #include #endif #ifdef HAVE_STDBOOL_H #include #else #ifndef bool #define bool char #define false 0 #define true 1 #endif #endif #ifdef HAVE_INTTYPES_H #include #endif #ifdef HAVE_SYSEXITS_H #include #else /* todo: we should move this file out of win32, because it could be used * on all platforms without it's own sysexits.h */ #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_UN_H #include #endif #ifdef HAVE_SYS_RESOURCE_H #include #endif #ifdef HAVE_SYS_UIO_H #include #endif #ifdef HAVE_NETINET_TCP_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif /* some POSIX systems need the following definition * to get mlockall flags out of sys/mman.h. */ #ifndef _P1003_1B_VISIBLE #define _P1003_1B_VISIBLE #endif /* need this to get IOV_MAX on some platforms. */ #ifndef __need_IOV_MAX #define __need_IOV_MAX #endif #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_SYS_MMAN_H #include #endif /* FreeBSD 4.x doesn't have IOV_MAX exposed. */ #ifndef IOV_MAX #if defined(__FreeBSD__) || defined(__APPLE__) # define IOV_MAX 1024 #endif #endif #if defined(ENABLE_SASL) || defined(ENABLE_ISASL) #define SASL_ENABLED #endif #endif