7 #define __EXPORT_TEMPLATE(x) 11 #define COMMON_64_CLEAN 12 #define COMMON_ASYNC_OVERRIDE 13 #define COMMON_OST_NAMESPACE 14 #define COMMON_THREAD_SLEEP 15 #define COMMON_NET_DEVICES 16 #define COMMON_THREAD_DEBUG 17 #define COMMON_DEADLOCK_DEBUG 18 #define COMMON_NAMED_MUTEX 19 #define COMMON_PROCESS_ATTACH 20 #define COMMON_XML_PARSING 21 #define COMMON_TIMER_SLEEP 23 #if __GNUC__ > 1 && !defined(__STRICT_ANSI__) && !defined(__PEDANTIC__) 24 #define DYNAMIC_LOCAL_ARRAYS 27 #if defined(__CYGWIN__) 28 #define _POSIX_REALTIME_SIGNALS 29 #define _POSIX_THREADS 32 #if defined(__APPLE__) && defined(__MACH__) 35 #define _P1003_1B_VISIBLE 42 #if defined(__FreeBSD__) 44 #define __BSD_VISIBLE 1 55 #ifndef _XOPEN_SOURCE_EXTENDED 56 #define _XOPEN_SOURCE_EXTENDED 58 #ifndef _INCLUDE_LONGLONG 59 #define _INCLUDE_LONGLONG 66 #elif !defined(__hpux) && !defined(_AIX) 70 #if defined(__sun) || defined(__SUN__) 71 #define __EXTENSIONS__ 1 79 #define _THREAD_SAFE 1 86 #if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) &&!defined(__OpenBSD__) && !defined(__MACH__) && !defined(__NetBSD__) 87 #define _XOPEN_SOURCE 600 95 #define HAVE_UNISTD_H 1 96 #define HAVE_FEATURES_H 1 97 #define HAVE_SYS_TYPES_H 1 104 #ifdef HAVE_FEATURES_H 105 #include <features.h> 109 #ifdef HAVE_SYS_TYPES_H 110 #include <sys/types.h> 115 #define HAVE_SYS_TIME_H 1 116 #define TIME_WITH_SYS_TIME 1 117 #if TIME_WITH_SYS_TIME 118 #include <sys/time.h> 121 #include <sys/time.h> 128 #define HAVE_SYS_TYPES_STD 1 129 #define HAVE_SYS_TYPES_64 1 130 #define HAVE_LONG_LONG 1 133 #ifdef HAVE_SYS_TYPES_H 134 #include <sys/types.h> 137 #ifdef HAVE_BITS_WORSIZE_H 138 #include <bits/wordtypes.h> 141 #ifdef HAVE_SYS_TYPES_STD 148 #ifdef HAVE_SYS_TYPES_64 155 typedef unsigned char uint8;
157 typedef unsigned short uint16;
159 typedef unsigned int uint32;
162 #ifndef HAVE_SYS_TYPES_64 163 #if defined(__WORDSIZE) || defined(__arch64__) 164 #if __WORDSIZE >= 64 || defined(__arch64__) 165 typedef long int int64;
166 typedef unsigned long int uint64;
167 #define HAVE_SYS_TYPES_64 1 173 #ifndef HAVE_SYS_TYPES_64 175 #if defined(HAVE_LONG_LONG) || defined(_LONGLONG) 177 typedef long long int int64;
179 typedef unsigned long long int uint64;
180 #define HAVE_SYS_TYPES_64 1 186 #ifndef HAVE_SYS_TYPES_64 187 #if defined(HAVE_LONG_LONG) || defined(_LONGLONG) 189 typedef long long int64;
190 typedef unsigned long long uint64;
196 #define CCXX_EXCEPTIONS 1 202 #define CCXX_HAVE_NEW_INIT 1 205 #define CCXX_NAMESPACES 1 229 #define ETC_PREFIX "/etc/" 232 #define HAVE_ALLOCA_H 1 235 #define HAVE_ARPA_INET_H 1 244 #define HAVE_BITS_WORDSIZE_H 1 247 #define HAVE_BOOL_TYPE 1 256 #define HAVE_DLFCN_H 1 259 #define HAVE_ENDIAN_H 1 262 #define HAVE_ERRNO_H 1 265 #define HAVE_EXCEPTION 1 268 #define HAVE_EXTRAS 1 271 #define HAVE_FCNTL_H 1 274 #define HAVE_FEATURES_H 1 283 #define HAVE_GETADDRINFO 1 286 #define HAVE_GETGRNAM_R 1 289 #define HAVE_GETHOSTBYNAME2 1 292 #define HAVE_GETOPT 1 295 #define HAVE_GETOPT_H 1 298 #define HAVE_GETOPT_LONG 1 301 #define HAVE_GETPAGESIZE 1 304 #define HAVE_GETPWNAM_R 1 307 #define HAVE_GETPWUID_R 1 310 #define HAVE_GETTIMEOFDAY 1 313 #define HAVE_HIRES_TIMER 1 316 #define HAVE_INET_ATON 1 319 #define HAVE_INET_PTON 1 322 #define HAVE_INET_SOCKETS 1 325 #define HAVE_INTTYPES_H 1 346 #define HAVE_LIMITS_H 1 349 #define HAVE_LINUX_IN6_H 1 352 #define HAVE_LINUX_NETFILTER_IPV4_H 1 355 #define HAVE_LINUX_NETFILTER_IPV6_H 1 358 #define HAVE_LOCALTIME_R 1 364 #define HAVE_LONG_LONG 1 376 #define HAVE_MEMMOVE 1 385 #define HAVE_MLOCKALL 1 388 #define HAVE_MODULES 1 394 #define HAVE_NAT_NETFILTER 1 406 #define HAVE_NETINET_IN_H 1 409 #define HAVE_NETINET_IN_SYSTM_H 1 421 #define HAVE_NETINET_IP_H 1 427 #define HAVE_NET_IF_H 1 439 #define HAVE_POLL_H 1 442 #define HAVE_POSIX_MEMALIGN 1 445 #define HAVE_PREAD_PWRITE 1 448 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 451 #define HAVE_PTHREAD_CANCEL 1 457 #define HAVE_PTHREAD_H 1 466 #define HAVE_PTHREAD_MUTEXATTR_SETTYPE 1 472 #define HAVE_PTHREAD_NANOSLEEP 1 478 #define HAVE_PTHREAD_RWLOCK 1 487 #define HAVE_PTHREAD_SETCANCELTYPE 1 493 #define HAVE_PTHREAD_YIELD 1 499 #define HAVE_READDIR_R 1 502 #define HAVE_REALPATH 1 505 #define HAVE_SCHED_GETSCHEDULER 1 508 #define HAVE_SCHED_H 1 514 #define HAVE_SEMAPHORE_H 1 517 #define HAVE_SETEGID 1 520 #define HAVE_SETENV 1 523 #define HAVE_SETITIMER 1 526 #define HAVE_SETPGRP 1 532 #define HAVE_SIGACTION 1 535 #define HAVE_SIGWAIT 1 538 #define HAVE_SIGWAIT2 1 541 #define HAVE_SNPRINTF 1 544 #define HAVE_SOCKLEN_T 1 547 #define HAVE_SSTREAM 1 553 #define HAVE_STDINT_H 1 556 #define HAVE_STDIO_H 1 559 #define HAVE_STDLIB_H 1 562 #define HAVE_STRCASECMP 1 565 #define HAVE_STRDUP 1 568 #define HAVE_STRERROR_R 1 571 #define HAVE_STRINGS_H 1 574 #define HAVE_STRING_H 1 577 #define HAVE_STRTOK_R 1 580 #define HAVE_SYSLOG_H 1 592 #define HAVE_SYS_FCNTL_H 1 595 #define HAVE_SYS_FILE_H 1 598 #define HAVE_SYS_IOCTL_H 1 607 #define HAVE_SYS_PARAM_H 1 610 #define HAVE_SYS_POLL_H 1 616 #define HAVE_SYS_SELECT_H 1 619 #define HAVE_SYS_SOCKET_H 1 625 #define HAVE_SYS_STAT_H 1 631 #define HAVE_SYS_TIME_H 1 634 #define HAVE_SYS_TYPES_64 1 637 #define HAVE_SYS_TYPES_H 1 640 #define HAVE_SYS_TYPES_STD 1 643 #define HAVE_SYS_UN_H 1 646 #define HAVE_SYS_WAIT_H 1 652 #define HAVE_UNISTD_H 1 655 #define HAVE_UNIX_SOCKETS 1 661 #define HAVE_WAITPID 1 664 #define HAVE_WCHAR_H 1 676 #define HAVE_ZLIB_H 1 679 #define LT_OBJDIR ".libs/" 682 #define CCXX_PACKAGE "commoncpp2" 685 #define CCXX_PACKAGE_BUGREPORT "" 688 #define CCXX_PACKAGE_NAME "" 691 #define CCXX_PACKAGE_STRING "" 694 #define CCXX_PACKAGE_TARNAME "" 697 #define CCXX_PACKAGE_URL "" 700 #define CCXX_PACKAGE_CCXX_VERSION "" 703 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 706 #define RETSIGTYPE void 711 #define STDC_HEADERS 1 715 #define TIME_WITH_SYS_TIME 1 718 #define USE_MONOTONIC_TIMER 1 722 # define _ALL_SOURCE 1 725 #ifndef _DARWIN_C_SOURCE 726 # define _DARWIN_C_SOURCE 1 729 #ifndef __EXTENSIONS__ 730 # define __EXTENSIONS__ 1 734 # define _GNU_SOURCE 1 738 #ifndef _HPUX_ALT_XOPEN_SOCKET_API 739 # define _HPUX_ALT_XOPEN_SOCKET_API 1 749 #ifndef _NETBSD_SOURCE 750 # define _NETBSD_SOURCE 1 754 #ifndef _OPENBSD_SOURCE 755 # define _OPENBSD_SOURCE 1 758 #ifndef _POSIX_SOURCE 762 #ifndef _POSIX_1_SOURCE 766 #ifndef _POSIX_PTHREAD_SEMANTICS 767 # define _POSIX_PTHREAD_SEMANTICS 1 770 #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 771 # define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 774 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ 775 # define __STDC_WANT_IEC_60559_BFP_EXT__ 1 778 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ 779 # define __STDC_WANT_IEC_60559_DFP_EXT__ 1 782 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ 783 # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 786 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ 787 # define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 790 #ifndef __STDC_WANT_LIB_EXT2__ 791 # define __STDC_WANT_LIB_EXT2__ 1 794 #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ 795 # define __STDC_WANT_MATH_SPEC_FUNCS__ 1 798 #ifndef _TANDEM_SOURCE 799 # define _TANDEM_SOURCE 1 803 #ifndef _XOPEN_SOURCE 809 #define CCXX_VERSION "1.8.1" 836 #if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ 838 # define __restrict__ 847 #ifndef HAVE_STRERROR_R 848 #define strerror_r(e, b, l) b = ::strerror(e) 851 #ifndef HAVE_GETPWUID_R 852 #define getpwuid_r(uid, rec, buf, size, ptr) ptr = ::getpwuid(uid) 853 #define getpwnam_r(name, rec, buf, size, ptr) ptr = ::getpwnam(name) 862 #ifdef HAVE_SYS_POLL_H 863 #include <sys/poll.h> 867 #if defined(HAVE_POLL) && defined(POLLRDNORM) 875 #ifdef HAVE_SYS_LIBCSYS_H 876 #include <sys/libcsys.h> 879 #ifdef HAVE_WINSOCK2_H 880 #include <winsock2.h> 882 #ifdef HAVE_WINSOCK_H 885 #ifdef HAVE_SYS_SOCKET_H 886 #include <sys/socket.h> 890 #ifdef HAVE_SYS_SELECT_H 891 #include <sys/select.h> 895 #ifdef HAVE_NETINET_IN_H 896 #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) 899 #include <netinet/in.h> 901 #define _XOPEN_SOURCE_EXTENDED 904 #ifdef HAVE_ARPA_INET_H 905 #include <arpa/inet.h> 909 #ifdef HAVE_NETINET6_IN6_H 910 #include <netinet6/in6.h> 913 #ifdef HAVE_LINIX_IN6_H 914 #include <linux/in6.h> 917 #ifdef HAVE_NETINET_IN_SYSTM_H 918 #include <netinet/in_systm.h> 920 #ifdef HAVE_NETINET_IP_H 921 #include <netinet/ip.h> 930 #ifndef HAVE_INET_ATON 931 #define inet_aton(cp, addr) (((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1) 942 #define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1 944 #define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) + strlen((ptr)->sun_path)) 949 #ifndef HAVE_SOCKLEN_T 950 #if defined(i386) && defined(__svr4__) 951 #define HAVE_SOCKLEN_U 953 #if defined(__CYGWIN32__) 954 #define socklen_t int 956 typedef int socklen_t;
960 #ifdef HAVE_SOCKLEN_U 961 #if !defined(__CYGWIN32__) && !defined(__MINGW32__) 962 typedef unsigned socklen_t;
964 typedef int socklen_t;
976 #if defined(AF_INET6) && defined(HAVE_INET_PTON) 980 #define CCXX_MULTIFAMILY_IP 985 #ifndef HAVE_BOOL_TYPE 986 typedef enum {
true=1,
false=0 } bool;
993 #ifndef CCXX_EXCEPTIONS 995 #ifdef HAVE_EXCEPTION 996 #define HAVE_EXCEPTION 1 999 #define THROW(x) abort() 1004 #define THROWS_EMPTY 1009 #define THROW(x) throw x 1010 #define THROWS(x) throw(x) 1011 #define NEW_THROWS throw() 1012 #define THROWS_EMPTY throw() 1018 #ifdef CCXX_NAMESPACES 1019 #define USING(x) using namespace x; 1025 #define KAI_NONSTD_IOSTREAM 1 1033 #define COMMON_SECURE 1036 #define COMMON_NAMESPACE ost 1037 #define NAMESPACE_COMMON namespace ost { 1038 #define END_NAMESPACE } 1040 #ifdef HAVE_VISIBILITY 1041 #define __EXPORT __attribute__ ((visibility("default"))) 1042 #define __DLLRTL __attribute__ ((visibility("default"))) 1043 #define __LOCAL __attribute__ ((visibility("hidden"))) 1052 #define ETC_PREFIX "/etc/" 1056 #define ETC_PREFIX "/etc/" 1066 #ifndef HAVE_FCNTL_H 1067 #ifdef HAVE_SYS_FCNTL_H 1068 #include <sys/fcntl.h> 1073 #ifdef HAVE_SYS_FCNTL_H 1074 #include <sys/fcntl.h> 1081 #if defined(HAVE_ENDIAN_H) 1083 #elif defined(HAVE_SYS_ISA_DEFS_H) 1084 #include <sys/isa_defs.h> 1085 #ifdef _LITTLE_ENDIAN 1086 #define __BYTE_ORDER 1234 1088 #define __BYTE_ORDER 4321 1090 #if _ALIGNMENT_REQUIRED > 0 1091 #define __BYTE_ALIGNMENT _MAX_ALIGNMENT 1093 #define __BYTE_ALIGNMENT 1 1097 #ifndef __LITTLE_ENDIAN 1098 #define __LITTLE_ENDIAN 1234 1099 #define __BIG_ENDIAN 4321 1102 #ifndef __BYTE_ORDER 1103 #define __BYTE_ORDER 1234 1106 #ifndef __BYTE_ALIGNMENT 1107 #if defined(SPARC) || defined(sparc) 1108 #if defined(__arch64__) || defined(__sparcv9) 1109 #define __BYTE_ALIGNMENT 8 1111 #define __BYTE_ALIGNMENT 4 1116 #ifndef __BYTE_ALIGNMENT 1117 #define __BYTE_ALIGNMENT 1 1123 #ifdef HAVE_SIGACTION 1124 #ifdef HAVE_BSD_SIGNAL_H 1133 #ifdef HAVE_SIGWAIT2 1134 #ifndef _POSIX_PTHREAD_SEMANTICS 1135 #define _POSIX_PTHREAD_SEMANTICS 1 1139 #ifdef HAVE_BSD_SIGNAL_H 1140 #include <bsd/signal.h> 1145 #define SA_ONESHOT SA_RESETHAND 1152 #ifdef HAVE_STRINGS_H 1154 #include <strings.h> 1158 #ifdef HAVE_ALLOCA_H 1162 #ifndef HAVE_SNPRINTF 1163 #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1400 1164 #define snprintf _snprintf 1165 #define vsnprintf _vsnprintf 1169 #ifdef HAVE_STRCASECMP 1171 #define stricmp(x,y) strcasecmp(x,y) 1174 #define strnicmp(x,y,n) strncasecmp(x,y,n) 1177 #define stristr(x, y) strcasestr(x,y) 1184 #ifdef HAVE_THREAD_H 1185 #include "/usr/include/thread.h" 1186 #if defined(i386) && defined(__svr4__) && !defined(__sun) 1187 #define _THR_UNIXWARE 1189 #if defined(__SVR4) && defined(__sun) 1192 #if defined(__SVR4__) && defined(__SUN__) 1198 #ifdef HAVE_WORKING_SYS_ATOMIC_H 1199 #include <sys/atomic.h> 1201 #elif defined(HAVE_ATOMIC_AIX) 1202 #include <sys/atomic_op.h> 1208 #if defined(__cplusplus) 1209 #if defined(HAVE_GCC_BITS_ATOMIC) || defined(HAVE_GCC_CXX_BITS_ATOMIC) 1210 #include <bits/atomicity.h> 1215 #if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) ) 1221 #include <pthread.h> 1223 #ifdef HAVE_PTHREAD_NP_H 1224 #include <pthread_np.h> 1227 #ifdef HAVE_SEMAPHORE_H 1228 #include <semaphore.h> 1230 #ifdef _POSIX_PRIORITY_SCHEDULING 1234 #ifdef HAVE_SYS_SCHED_H 1235 #include <sys/sched.h> 1240 #define __PTHREAD_H__ 1241 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1242 #ifdef MUTEX_TYPE_COUNTING_FAST 1243 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1246 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1247 #ifdef PTHREAD_MUTEX_RECURSIVE 1248 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1251 #ifndef HAVE_PTHREAD_MUTEXATTR_SETTYPE 1252 #if HAVE_PTHREAD_MUTEXATTR_SETKIND_NP 1253 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1254 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1256 #define pthread_mutexattr_gettype(x, y) pthread_mutexattr_getkind_np(x, y) 1257 #define pthread_mutexattr_settype(x, y) pthread_mutexattr_setkind_np(x, y) 1259 #if HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP 1260 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1261 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1263 #define pthread_mutexattr_settype(x, y) pthread_mutexattr_settype_np(x, y) 1264 #define pthread_mutexattr_gettype(x, y) pthread_mutexattr_gettype_np(x, y) 1268 #ifdef HAVE_PTHREAD_MACH_THREAD_NP 1272 #ifndef HAVE_PTHREAD_YIELD 1273 #ifdef HAVE_PTHREAD_YIELD_NP 1274 #define pthread_yield() pthread_yield_np() 1275 #define HAVE_PTHREAD_YIELD 1 1279 #ifndef HAVE_PTHREAD_YIELD 1280 #ifdef HAVE_PTHREAD_SCHED_YIELD 1281 #define pthread_yield() sched_yield() 1282 #define HAVE_PTHREAD_YIELD 1 1286 #ifndef HAVE_PTHREAD_DELAY 1287 #ifdef HAVE_PTHREAD_DELAY_NP 1288 #define HAVE_PTHREAD_DELAY 1289 #define pthread_delay(x) pthread_delay_np(x) 1291 #if defined(HAVE_PTHREAD_NANOSLEEP) 1292 #ifndef HAVE_PTHREAD_DELAY 1293 #define HAVE_PTHREAD_DELAY 1296 extern "C" int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp);
1299 #define pthread_delay(x) nanosleep(x, NULL) 1304 #ifdef HAVE_PTHREAD_ATTR_SETSTACK 1305 #ifndef PTHREAD_STACK_MIN 1306 #define PTHREAD_STACK_MIN 32768 1310 #ifndef HAVE_PTHREAD_CANCEL 1312 #define CCXX_SIG_THREAD_CANCEL SIGCANCEL 1314 #define CCXX_SIG_THREAD_CANCEL SIGQUIT 1316 #define pthread_cancel(x) pthread_kill(x, CCXX_SIG_THREAD_CANCEL) 1317 #define pthread_setcanceltype(x, y) 1318 #define pthread_setcancelstate(x, y) 1321 #ifndef HAVE_PTHREAD_SETCANCELTYPE 1322 #ifdef HAVE_PTHREAD_SETCANCEL 1324 { PTHREAD_CANCEL_ASYNCHRONOUS = CANCEL_ON,
1325 PTHREAD_CANCEL_DEFERRED = CANCEL_OFF};
1327 { PTHREAD_CANCEL_ENABLE = CANCEL_ON,
1328 PTHREAD_CANCEL_DISABLE = CANCEL_OFF};
1329 #define pthread_setcancelstate(x, y) \ 1330 (y == NULL) ? pthread_setcancel(x) : *y = pthread_setcancel 1331 #define pthread_setcanceltype(x, y) \ 1332 (y == NULL) ? pthread_setasynccancel(x) | *y = pthread_setasynccancel(x) 1334 #define pthread_setcanceltype(x, y) 1335 #define pthread_setcancelstate(x, y) 1340 #ifdef HAVE_PTHREAD_SUSPEND u_int8_t uint8
Definition: config.h:143
int8_t int8
Definition: config.h:142
u_int16_t uint16
Definition: config.h:145
int32_t int32
Definition: config.h:146
u_int32_t uint32
Definition: config.h:147
int64_t int64
Definition: config.h:150
u_int64_t uint64
Definition: config.h:151
int16_t int16
Definition: config.h:144