/* config.h.in. Generated from configure.ac by autoheader. */ #ifndef CCXX_CONFIG_H_ #define CCXX_CONFIG_H_ #define __DLL #define __EXPORT_TEMPLATE(x) #undef CCXX_EMPTY #define CCXX_EMPTY #define COMMON_64_CLEAN #define COMMON_ASYNC_OVERRIDE #define COMMON_OST_NAMESPACE #define COMMON_THREAD_SLEEP #define COMMON_NET_DEVICES #define COMMON_THREAD_DEBUG #define COMMON_DEADLOCK_DEBUG #define COMMON_NAMED_MUTEX #define COMMON_PROCESS_ATTACH #define COMMON_XML_PARSING #define COMMON_TIMER_SLEEP #if __GNUC__ > 1 && !defined(__STRICT_ANSI__) && !defined(__PEDANTIC__) #define DYNAMIC_LOCAL_ARRAYS #endif #if defined(__CYGWIN__) #define _POSIX_REALTIME_SIGNALS #define _POSIX_THREADS #endif #if defined(__APPLE__) && defined(__MACH__) #ifndef MACOSX #define MACOSX #define _P1003_1B_VISIBLE #endif #ifndef _PTHREADS #define _PTHREADS 1 #endif #endif #if defined(__FreeBSD__) #ifndef __BSD_VISIBLE #define __BSD_VISIBLE 1 #endif #endif #ifdef _AIX #ifndef _ALL_SOURCE #define _ALL_SOURCE #endif #endif #ifdef __hpux #ifndef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED #endif #ifndef _INCLUDE_LONGLONG #define _INCLUDE_LONGLONG #endif #endif #define CCXX_PACKING #if defined(__GNUC__) #define CCXX_PACKED #elif !defined(__hpux) && !defined(_AIX) #define CCXX_PACKED #endif #if defined(__sun) || defined(__SUN__) #define __EXTENSIONS__ 1 #endif #ifndef _REENTRANT #define _REENTRANT 1 #endif #ifndef _THREAD_SAFE #define _THREAD_SAFE 1 #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) &&!defined(__OpenBSD__) && !defined(__MACH__) && !defined(__NetBSD__) #define _XOPEN_SOURCE 600 #endif /* hack for BROKEN autoheader, since it will not predicitably order macros by any obvious means. */ #undef HAVE_UNISTD_H #undef HAVE_FEATURES_H #undef HAVE_SYS_TYPES_H #ifdef HAVE_UNISTD_H #include #endif #ifndef WIN32 #ifdef HAVE_FEATURES_H #include #endif #endif #ifdef HAVE_SYS_TYPES_H #include #endif #undef HAVE_SYS_TIME_H #undef TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME #include #else #if HAVE_SYS_TIME_H #include #endif #endif #undef HAVE_SYS_TYPES_STD #undef HAVE_SYS_TYPES_64 #undef HAVE_LONG_LONG #undef HAVE_SYS_TYPES #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_BITS_WORSIZE_H #include #endif #ifdef HAVE_SYS_TYPES_STD typedef int8_t int8; typedef u_int8_t uint8; typedef int16_t int16; typedef u_int16_t uint16; typedef int32_t int32; typedef u_int32_t uint32; #ifdef HAVE_SYS_TYPES_64 #define HAVE_64_BITS typedef int64_t int64; typedef u_int64_t uint64; #endif #else typedef char int8; typedef unsigned char uint8; typedef short int16; typedef unsigned short uint16; typedef int int32; typedef unsigned int uint32; #endif #ifndef HAVE_SYS_TYPES_64 #if defined(__WORDSIZE) || defined(__arch64__) #if __WORDSIZE >= 64 || defined(__arch64__) typedef long int int64; typedef unsigned long int uint64; #define HAVE_SYS_TYPES_64 #define HAVE_64_BITS #endif #endif #endif #ifndef HAVE_SYS_TYPES_64 #ifdef __GNUC__ #if defined(HAVE_LONG_LONG) || defined(_LONGLONG) __extension__ typedef long long int int64; __extension__ typedef unsigned long long int uint64; #define HAVE_SYS_TYPES_64 #define HAVE_64_BITS #endif #endif #endif #ifndef HAVE_SYS_TYPES_64 #if defined(HAVE_LONG_LONG) || defined(_LONGLONG) #define HAVE_64_BITS typedef long long int64; typedef unsigned long long uint64; #endif #endif /* has c++ exception handling */ #undef CCXX_EXCEPTIONS /* define gnutls */ #undef CCXX_GNUTLS /* have new with init */ #undef CCXX_HAVE_NEW_INIT /* has c++ namespaces */ #undef CCXX_NAMESPACES /* NAT support */ #undef CCXX_NAT /* define openssl */ #undef CCXX_OPENSSL /* defines ssl */ #undef CCXX_SSL /* aix fixes needed */ #undef COMMON_AIX_FIXES /* enable auditing */ #undef COMMON_MEMORY_AUDIT /* cygwin environment */ #undef CYGWIN_IMPORTS /* primary config prefix */ #undef ETC_CONFDIR /* system config prefix */ #undef ETC_PREFIX /* Define to 1 if you have the header file. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* atomic aix operations */ #undef HAVE_ATOMIC_AIX /* Define to 1 if you have the header file. */ #undef HAVE_BITS_ATOMICITY_H /* Define to 1 if you have the header file. */ #undef HAVE_BITS_WORDSIZE_H /* have bool type */ #undef HAVE_BOOL_TYPE /* Define to 1 if you have the header file. */ #undef HAVE_BSD_SIGNAL_H /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* have endian header */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_EXCEPTION /* Enable extras */ #undef HAVE_EXTRAS /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H /* has gcc atomic functions */ #undef HAVE_GCC_BITS_ATOMIC /* has __gnu_cxx atomic functions */ #undef HAVE_GCC_CXX_BITS_ATOMIC /* getaddrinfo interface support */ #undef HAVE_GETADDRINFO /* reentrant getgrnam */ #undef HAVE_GETGRNAM_R /* ipv6 host lookup */ #undef HAVE_GETHOSTBYNAME2 /* have getopt header */ #undef HAVE_GETOPT /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* reentrant getnam */ #undef HAVE_GETPWNAM_R /* reentrant getuid */ #undef HAVE_GETPWUID_R /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* have hires */ #undef HAVE_HIRES_TIMER /* has inet_aton */ #undef HAVE_INET_ATON /* ipv6 support */ #undef HAVE_INET_PTON /* inet sockets */ #undef HAVE_INET_SOCKETS /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_IP_COMPAT_H /* Define to 1 if you have the header file. */ #undef HAVE_IP_FIL_COMPAT_H /* Define to 1 if you have the header file. */ #undef HAVE_IP_FIL_H /* Define to 1 if you have the header file. */ #undef HAVE_IP_NAT_H /* Define to 1 if you have the `malloc' library (-lmalloc). */ #undef HAVE_LIBMALLOC /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_NETFILTER_IPV4_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_NETFILTER_IPV6_H /* reentrant localtime */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF /* have long longs */ #undef HAVE_LONG_LONG /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT /* mach dybloader */ #undef HAVE_MACH_DYLD /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mlock' function. */ #undef HAVE_MLOCK /* Define to 1 if you have the `mlockall' function. */ #undef HAVE_MLOCKALL /* support for plugin modules */ #undef HAVE_MODULES /* IPF NAT support */ #undef HAVE_NAT_IPF /* NetFilter NAT support */ #undef HAVE_NAT_NETFILTER /* PF NAT support */ #undef HAVE_NAT_PF /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_SYSTM_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_COMPAT_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_FIL_COMPAT_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_FIL_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_NAT_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_PFVAR_H /* old style iostreams */ #undef HAVE_OLD_IOSTREAM /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN /* has pwrite */ #undef HAVE_PREAD_PWRITE /* has stack size */ #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE /* has cancel */ #undef HAVE_PTHREAD_CANCEL /* has non portable delay */ #undef HAVE_PTHREAD_DELAY_NP /* posix thread header */ #undef HAVE_PTHREAD_H /* has mach link */ #undef HAVE_PTHREAD_MACH_THREAD_NP /* has non portable setkind */ #undef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP /* has setttype */ #undef HAVE_PTHREAD_MUTEXATTR_SETTYPE /* has non portable settype */ #undef HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP /* has nanosleep */ #undef HAVE_PTHREAD_NANOSLEEP /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_NP_H /* has rwlock support */ #undef HAVE_PTHREAD_RWLOCK /* has sched yield */ #undef HAVE_PTHREAD_SCHED_YIELD /* has setcancel */ #undef HAVE_PTHREAD_SETCANCEL /* has setcanceltype */ #undef HAVE_PTHREAD_SETCANCELTYPE /* has suspend */ #undef HAVE_PTHREAD_SUSPEND /* has yield */ #undef HAVE_PTHREAD_YIELD /* has np yield */ #undef HAVE_PTHREAD_YIELD_NP /* reentrant readdir */ #undef HAVE_READDIR_R /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH /* Define to 1 if you have the `sched_getscheduler' function. */ #undef HAVE_SCHED_GETSCHEDULER /* Define to 1 if you have the header file. */ #undef HAVE_SCHED_H /* Define to 1 if you have the header file. */ #undef HAVE_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SEMAPHORE_H /* Define to 1 if you have the `setegid' function. */ #undef HAVE_SETEGID /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setitimer' function. */ #undef HAVE_SETITIMER /* Define to 1 if you have the `setpgrp' function. */ #undef HAVE_SETPGRP /* have shload plugins */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the `sigwait' function. */ #undef HAVE_SIGWAIT /* 2 argument form */ #undef HAVE_SIGWAIT2 /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* has socklen_t type */ #undef HAVE_SOCKLEN_T /* Define to 1 if you have the header file. */ #undef HAVE_SSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_SS_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* reentrant strerror */ #undef HAVE_STRERROR_R /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* reentrant strtok */ #undef HAVE_STRTOK_R /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_HPOSIX_EVLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ATOMIC_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ATOMIC_OP_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* solaris endian */ #undef HAVE_SYS_ISA_DEFS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_LIBCSYS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_POLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SCHED_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STREAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* have 64 bit longs */ #undef HAVE_SYS_TYPES_64 /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* have systypes */ #undef HAVE_SYS_TYPES_STD /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_THREAD_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* has unix domain sockets */ #undef HAVE_UNIX_SOCKETS /* Define to 1 if you have the `wait4' function. */ #undef HAVE_WAIT4 /* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK_H /* has usable atomic functions */ #undef HAVE_WORKING_SYS_ATOMIC_H /* have zlib header */ #undef HAVE_ZLIB_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* mutex type */ #undef PTHREAD_MUTEXTYPE_RECURSIVE /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* use monotonic */ #undef USE_MONOTONIC_TIMER /* Version number of package */ #undef VERSION /* bsd system using linuxthreads */ #undef WITH_LINUXTHREADS /* darwin6 environment */ #undef _DARWIN6_ /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* endian byte order */ #undef __BYTE_ORDER #ifndef HAVE_STRERROR_R #define strerror_r(e, b, l) b = ::strerror(e) #endif #ifndef HAVE_GETPWUID_R #define getpwuid_r(uid, rec, buf, size, ptr) ptr = ::getpwuid(uid) #define getpwnam_r(name, rec, buf, size, ptr) ptr = ::getpwnam(name) #endif #ifdef HAVE_POLL_H #include #else #ifdef HAVE_SYS_POLL_H #include #endif #endif #if defined(HAVE_POLL) && defined(POLLRDNORM) #define USE_POLL #endif #ifdef HAVE_SYS_LIBCSYS_H #include #endif #ifdef HAVE_WINSOCK2_H #include #else #ifdef HAVE_WINSOCK_H #include #else #ifdef HAVE_SYS_SOCKET_H #include #ifdef HAVE_SELECT_H #include #else #ifdef HAVE_SYS_SELECT_H #include #endif #endif #ifdef HAVE_NETINET_IN_H #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) #undef _XOPEN_SOURCE_EXTENDED #endif #include #ifdef __hpux #define _XOPEN_SOURCE_EXTENDED #endif #endif #ifdef HAVE_ARPA_INET_H #include #include #endif #ifdef HAVE_NETINET6_IN6_H #include #endif #ifdef HAVE_LINIX_IN6_H #include #endif #ifdef HAVE_NETINET_IN_SYSTM_H #include #endif #ifdef HAVE_NETINET_IP_H #include #endif #ifdef HAVE_SYS_UN_H #include #endif #endif #endif #endif #ifndef HAVE_INET_ATON #define inet_aton(cp, addr) (((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1) #endif #ifndef SUN_LEN #ifdef SCM_RIGHTS #define HAVE_UN_LEN #endif #ifdef __linux__ #define HAVE_UN_LEN #endif #ifdef HAVE_UN_LEN #define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1 #else #define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) + strlen((ptr)->sun_path)) #endif #endif #ifndef _OSF_SOURCE #ifndef HAVE_SOCKLEN_T #if defined(i386) && defined(__svr4__) #define HAVE_SOCKLEN_U #else #if defined(__CYGWIN32__) #define socklen_t int #else typedef int socklen_t; #endif #endif #ifdef HAVE_SOCKLEN_U #if !defined(__CYGWIN32__) && !defined(__MINGW32__) typedef unsigned socklen_t; #else typedef int socklen_t; #endif #endif #endif #endif #ifdef __hpux #ifdef mutable #undef mutable #endif #endif #if defined(AF_INET6) && defined(HAVE_INET_PTON) #define CCXX_IPV6 #endif #define CCXX_MULTIFAMILY_IP #ifndef HAVE_BOOL_TYPE typedef enum { true=1, false=0 } bool; #endif #ifndef CCXX_EXCEPTIONS /* disable HAVE_EXCEPTION */ #ifdef HAVE_EXCEPTION #undef HAVE_EXCEPTION #endif /* throw - replacement to throw an exception */ #define THROW(x) abort() /* throw - replacement to declare an exception */ #define THROWS(x) /* throw - for empty list */ #define NEW_THROWS #define THROWS_EMPTY /* * work around dangeling if/else combinations: */ #else #define THROW(x) throw x #define THROWS(x) throw(x) #define NEW_THROWS throw() #define THROWS_EMPTY throw() #endif #ifdef CCXX_NAMESPACES #define USING(x) using namespace x; #else #define USING(x) #endif #ifdef __KCC #define KAI_NONSTD_IOSTREAM 1 #endif #ifdef HAVE_SS_H #include #define COMMON_SECURE #endif #define COMMON_NAMESPACE ost #define NAMESPACE_COMMON namespace ost { #define END_NAMESPACE } #ifdef HAVE_VISIBILITY #define __EXPORT __attribute__ ((visibility("default"))) #define __DLLRTL __attribute__ ((visibility("default"))) #define __LOCAL __attribute__ ((visibility("hidden"))) #else #define __EXPORT #define __DLLRTL #define __LOCAL #endif #ifndef ETC_PREFIX #ifdef WIN32 #define ETC_PREFIX "C:\\WINDOWS\\" #endif #ifndef ETC_PREFIX #define ETC_PREFIX "/etc/" #endif #endif #endif #ifndef HAVE_FCNTL_H #ifdef HAVE_SYS_FCNTL_H #include #endif #else #include #ifndef O_NDELAY #ifdef HAVE_SYS_FCNTL_H #include #endif #endif #endif #if defined(HAVE_ENDIAN_H) #include #elif defined(HAVE_SYS_ISA_DEFS_H) #include #ifdef _LITTLE_ENDIAN #define __BYTE_ORDER 1234 #else #define __BYTE_ORDER 4321 #endif #if _ALIGNMENT_REQUIRED > 0 #define __BYTE_ALIGNMENT _MAX_ALIGNMENT #else #define __BYTE_ALIGNMENT 1 #endif #endif #ifndef __LITTLE_ENDIAN #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #endif #ifndef __BYTE_ORDER #define __BYTE_ORDER 1234 #endif #ifndef __BYTE_ALIGNMENT #if defined(SPARC) || defined(sparc) #if defined(__arch64__) || defined(__sparcv9) #define __BYTE_ALIGNMENT 8 #else #define __BYTE_ALIGNMENT 4 #endif #endif #endif #ifndef __BYTE_ALIGNMENT #define __BYTE_ALIGNMENT 1 #endif #ifdef HAVE_SIGACTION #ifdef HAVE_BSD_SIGNAL_H #undef HAVE_BSD_SIGNAL_H #endif #endif /* Cause problem with Solaris... and perhaps Digital Unix? However, the autoconf test in ost_signal defines _POSIX_PTHREAD_SEMANTICS when trying to compile sigwait2. */ #ifdef HAVE_SIGWAIT2 #ifndef _POSIX_PTHREAD_SEMANTICS #define _POSIX_PTHREAD_SEMANTICS #endif #endif #ifdef HAVE_BSD_SIGNAL_H #include #else #include #endif #ifndef SA_ONESHOT #define SA_ONESHOT SA_RESETHAND #endif #include #ifdef HAVE_STRINGS_H #ifndef _AIX #include #endif #endif #ifdef HAVE_ALLOCA_H #include #endif #ifndef HAVE_SNPRINTF #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1400 #define snprintf _snprintf #define vsnprintf _vsnprintf #endif #endif #ifdef HAVE_STRCASECMP #ifndef stricmp #define stricmp(x,y) strcasecmp(x,y) #endif #ifndef strnicmp #define strnicmp(x,y,n) strncasecmp(x,y,n) #endif #ifndef stristr #define stristr(x, y) strcasestr(x,y) #endif #endif #ifdef HAVE_THREAD_H #include "@thrprefix@/thread.h" #if defined(i386) && defined(__svr4__) && !defined(__sun) #define _THR_UNIXWARE #endif #if defined(__SVR4) && defined(__sun) #define _THR_SUNOS5 #else #if defined(__SVR4__) && defined(__SUN__) #define _THR_SUNOS5 #endif #endif #endif #ifdef HAVE_WORKING_SYS_ATOMIC_H #include #define HAVE_ATOMIC #elif defined(HAVE_ATOMIC_AIX) #include #ifndef HAVE_ATOMIC #define HAVE_ATOMIC #endif #endif #if defined(__cplusplus) #if defined(HAVE_GCC_BITS_ATOMIC) || defined(HAVE_GCC_CXX_BITS_ATOMIC) #include #define HAVE_ATOMIC #endif #endif #if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) ) #ifdef __QNX__ #define __EXT_QNX #endif #include #ifdef HAVE_PTHREAD_NP_H #include #endif #ifdef HAVE_SEMAPHORE_H #include #endif #ifdef _POSIX_PRIORITY_SCHEDULING #ifdef HAVE_SCHED_H #include #else #ifdef HAVE_SYS_SCHED_H #include #endif #endif #endif #define __PTHREAD_H__ #ifndef PTHREAD_MUTEXTYPE_RECURSIVE #ifdef MUTEX_TYPE_COUNTING_FAST #define PTHREAD_MUTEXTYPE_RECURSIVE MUTEX_TYPE_COUNTING_FAST #endif #endif #ifndef PTHREAD_MUTEXTYPE_RECURSIVE #ifdef PTHREAD_MUTEX_RECURSIVE #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE #endif #endif #ifndef HAVE_PTHREAD_MUTEXATTR_SETTYPE #if HAVE_PTHREAD_MUTEXATTR_SETKIND_NP #ifndef PTHREAD_MUTEXTYPE_RECURSIVE #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP #endif #define pthread_mutexattr_gettype(x, y) pthread_mutexattr_getkind_np(x, y) #define pthread_mutexattr_settype(x, y) pthread_mutexattr_setkind_np(x, y) #endif #if HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP #ifndef PTHREAD_MUTEXTYPE_RECURSIVE #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEXTYPE_RECURSIVE_NP #endif #define pthread_mutexattr_settype(x, y) pthread_mutexattr_settype_np(x, y) #define pthread_mutexattr_gettype(x, y) pthread_mutexattr_gettype_np(x, y) #endif #endif #ifdef HAVE_PTHREAD_MACH_THREAD_NP #define _THR_MACH #endif #ifndef HAVE_PTHREAD_YIELD #ifdef HAVE_PTHREAD_YIELD_NP #define pthread_yield() pthread_yield_np() #define HAVE_PTHREAD_YIELD #endif #endif #ifndef HAVE_PTHREAD_YIELD #ifdef HAVE_PTHREAD_SCHED_YIELD #define pthread_yield() sched_yield() #define HAVE_PTHREAD_YIELD #endif #endif #ifndef HAVE_PTHREAD_DELAY #ifdef HAVE_PTHREAD_DELAY_NP #define HAVE_PTHREAD_DELAY #define pthread_delay(x) pthread_delay_np(x) #endif #if defined(HAVE_PTHREAD_NANOSLEEP) #ifndef HAVE_PTHREAD_DELAY #define HAVE_PTHREAD_DELAY #ifdef __FreeBSD__ #ifdef __cplusplus extern "C" int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); #endif #endif #define pthread_delay(x) nanosleep(x, NULL) #endif #endif #endif #ifdef HAVE_PTHREAD_ATTR_SETSTACK #ifndef PTHREAD_STACK_MIN #define PTHREAD_STACK_MIN 32768 #endif #endif #ifndef HAVE_PTHREAD_CANCEL #ifdef SIGCANCEL #define CCXX_SIG_THREAD_CANCEL SIGCANCEL #else #define CCXX_SIG_THREAD_CANCEL SIGQUIT #endif #define pthread_cancel(x) pthread_kill(x, CCXX_SIG_THREAD_CANCEL) #define pthread_setcanceltype(x, y) #define pthread_setcancelstate(x, y) #endif #ifndef HAVE_PTHREAD_SETCANCELTYPE #ifdef HAVE_PTHREAD_SETCANCEL enum { PTHREAD_CANCEL_ASYNCHRONOUS = CANCEL_ON, PTHREAD_CANCEL_DEFERRED = CANCEL_OFF}; enum { PTHREAD_CANCEL_ENABLE = CANCEL_ON, PTHREAD_CANCEL_DISABLE = CANCEL_OFF}; #define pthread_setcancelstate(x, y) \ (y == NULL) ? pthread_setcancel(x) : *y = pthread_setcancel #define pthread_setcanceltype(x, y) \ (y == NULL) ? pthread_setasynccancel(x) | *y = pthread_setasynccancel(x) #else #define pthread_setcanceltype(x, y) #define pthread_setcancelstate(x, y) #endif #endif #ifdef _AIX #ifdef HAVE_PTHREAD_SUSPEND #undef HAVE_PTHREAD_SUSPEND #endif #endif #endif