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 358 #define HAVE_LOCALTIME_R 1 364 #define HAVE_LONG_LONG 1 376 #define HAVE_MEMMOVE 1 379 #define HAVE_MEMORY_H 1 385 #define HAVE_MLOCKALL 1 388 #define HAVE_MODULES 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_STDLIB_H 1 559 #define HAVE_STRCASECMP 1 562 #define HAVE_STRDUP 1 565 #define HAVE_STRERROR_R 1 568 #define HAVE_STRINGS_H 1 571 #define HAVE_STRING_H 1 574 #define HAVE_STRTOK_R 1 577 #define HAVE_SYSLOG_H 1 589 #define HAVE_SYS_FCNTL_H 1 592 #define HAVE_SYS_FILE_H 1 595 #define HAVE_SYS_IOCTL_H 1 604 #define HAVE_SYS_PARAM_H 1 607 #define HAVE_SYS_POLL_H 1 613 #define HAVE_SYS_SELECT_H 1 616 #define HAVE_SYS_SOCKET_H 1 622 #define HAVE_SYS_STAT_H 1 628 #define HAVE_SYS_TIME_H 1 631 #define HAVE_SYS_TYPES_64 1 634 #define HAVE_SYS_TYPES_H 1 637 #define HAVE_SYS_TYPES_STD 1 640 #define HAVE_SYS_UN_H 1 643 #define HAVE_SYS_WAIT_H 1 649 #define HAVE_UNISTD_H 1 652 #define HAVE_UNIX_SOCKETS 1 658 #define HAVE_WAITPID 1 670 #define HAVE_ZLIB_H 1 674 #define LT_OBJDIR ".libs/" 677 #define CCXX_PACKAGE "commoncpp2" 680 #define CCXX_PACKAGE_BUGREPORT "" 683 #define CCXX_PACKAGE_NAME "" 686 #define CCXX_PACKAGE_STRING "" 689 #define CCXX_PACKAGE_TARNAME "" 692 #define CCXX_PACKAGE_URL "" 695 #define CCXX_PACKAGE_CCXX_VERSION "" 698 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 701 #define RETSIGTYPE void 704 #define STDC_HEADERS 1 707 #define TIME_WITH_SYS_TIME 1 710 #define USE_MONOTONIC_TIMER 1 714 # define _ALL_SOURCE 1 718 # define _GNU_SOURCE 1 721 #ifndef _POSIX_PTHREAD_SEMANTICS 722 # define _POSIX_PTHREAD_SEMANTICS 1 725 #ifndef _TANDEM_SOURCE 726 # define _TANDEM_SOURCE 1 729 #ifndef __EXTENSIONS__ 730 # define __EXTENSIONS__ 1 735 #define CCXX_VERSION "1.8.1" 765 #define restrict __restrict 771 #if defined __SUNPRO_CC && !defined __RESTRICT 773 # define __restrict__ 782 #ifndef HAVE_STRERROR_R 783 #define strerror_r(e, b, l) b = ::strerror(e) 786 #ifndef HAVE_GETPWUID_R 787 #define getpwuid_r(uid, rec, buf, size, ptr) ptr = ::getpwuid(uid) 788 #define getpwnam_r(name, rec, buf, size, ptr) ptr = ::getpwnam(name) 797 #ifdef HAVE_SYS_POLL_H 798 #include <sys/poll.h> 802 #if defined(HAVE_POLL) && defined(POLLRDNORM) 810 #ifdef HAVE_SYS_LIBCSYS_H 811 #include <sys/libcsys.h> 814 #ifdef HAVE_WINSOCK2_H 815 #include <winsock2.h> 817 #ifdef HAVE_WINSOCK_H 820 #ifdef HAVE_SYS_SOCKET_H 821 #include <sys/socket.h> 825 #ifdef HAVE_SYS_SELECT_H 826 #include <sys/select.h> 830 #ifdef HAVE_NETINET_IN_H 831 #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) 834 #include <netinet/in.h> 836 #define _XOPEN_SOURCE_EXTENDED 839 #ifdef HAVE_ARPA_INET_H 840 #include <arpa/inet.h> 844 #ifdef HAVE_NETINET6_IN6_H 845 #include <netinet6/in6.h> 848 #ifdef HAVE_LINIX_IN6_H 849 #include <linux/in6.h> 852 #ifdef HAVE_NETINET_IN_SYSTM_H 853 #include <netinet/in_systm.h> 855 #ifdef HAVE_NETINET_IP_H 856 #include <netinet/ip.h> 865 #ifndef HAVE_INET_ATON 866 #define inet_aton(cp, addr) (((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1) 877 #define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1 879 #define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) + strlen((ptr)->sun_path)) 884 #ifndef HAVE_SOCKLEN_T 885 #if defined(i386) && defined(__svr4__) 886 #define HAVE_SOCKLEN_U 888 #if defined(__CYGWIN32__) 889 #define socklen_t int 891 typedef int socklen_t;
895 #ifdef HAVE_SOCKLEN_U 896 #if !defined(__CYGWIN32__) && !defined(__MINGW32__) 897 typedef unsigned socklen_t;
899 typedef int socklen_t;
911 #if defined(AF_INET6) && defined(HAVE_INET_PTON) 915 #define CCXX_MULTIFAMILY_IP 920 #ifndef HAVE_BOOL_TYPE 921 typedef enum {
true=1,
false=0 } bool;
928 #ifndef CCXX_EXCEPTIONS 930 #ifdef HAVE_EXCEPTION 931 #define HAVE_EXCEPTION 1 934 #define THROW(x) abort() 944 #define THROW(x) throw x 945 #define THROWS(x) throw(x) 946 #define NEW_THROWS throw() 947 #define THROWS_EMPTY throw() 953 #ifdef CCXX_NAMESPACES 954 #define USING(x) using namespace x; 960 #define KAI_NONSTD_IOSTREAM 1 968 #define COMMON_SECURE 971 #define COMMON_NAMESPACE ost 972 #define NAMESPACE_COMMON namespace ost { 973 #define END_NAMESPACE } 975 #ifdef HAVE_VISIBILITY 976 #define __EXPORT __attribute__ ((visibility("default"))) 977 #define __DLLRTL __attribute__ ((visibility("default"))) 978 #define __LOCAL __attribute__ ((visibility("hidden"))) 987 #define ETC_PREFIX "/etc/" 991 #define ETC_PREFIX "/etc/" 1001 #ifndef HAVE_FCNTL_H 1002 #ifdef HAVE_SYS_FCNTL_H 1003 #include <sys/fcntl.h> 1008 #ifdef HAVE_SYS_FCNTL_H 1009 #include <sys/fcntl.h> 1016 #if defined(HAVE_ENDIAN_H) 1018 #elif defined(HAVE_SYS_ISA_DEFS_H) 1019 #include <sys/isa_defs.h> 1020 #ifdef _LITTLE_ENDIAN 1021 #define __BYTE_ORDER 1234 1023 #define __BYTE_ORDER 4321 1025 #if _ALIGNMENT_REQUIRED > 0 1026 #define __BYTE_ALIGNMENT _MAX_ALIGNMENT 1028 #define __BYTE_ALIGNMENT 1 1032 #ifndef __LITTLE_ENDIAN 1033 #define __LITTLE_ENDIAN 1234 1034 #define __BIG_ENDIAN 4321 1037 #ifndef __BYTE_ORDER 1038 #define __BYTE_ORDER 1234 1041 #ifndef __BYTE_ALIGNMENT 1042 #if defined(SPARC) || defined(sparc) 1043 #if defined(__arch64__) || defined(__sparcv9) 1044 #define __BYTE_ALIGNMENT 8 1046 #define __BYTE_ALIGNMENT 4 1051 #ifndef __BYTE_ALIGNMENT 1052 #define __BYTE_ALIGNMENT 1 1058 #ifdef HAVE_SIGACTION 1059 #ifdef HAVE_BSD_SIGNAL_H 1068 #ifdef HAVE_SIGWAIT2 1069 #ifndef _POSIX_PTHREAD_SEMANTICS 1070 #define _POSIX_PTHREAD_SEMANTICS 1 1074 #ifdef HAVE_BSD_SIGNAL_H 1075 #include <bsd/signal.h> 1080 #define SA_ONESHOT SA_RESETHAND 1087 #ifdef HAVE_STRINGS_H 1089 #include <strings.h> 1093 #ifdef HAVE_ALLOCA_H 1097 #ifndef HAVE_SNPRINTF 1098 #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1400 1099 #define snprintf _snprintf 1100 #define vsnprintf _vsnprintf 1104 #ifdef HAVE_STRCASECMP 1106 #define stricmp(x,y) strcasecmp(x,y) 1109 #define strnicmp(x,y,n) strncasecmp(x,y,n) 1112 #define stristr(x, y) strcasestr(x,y) 1119 #ifdef HAVE_THREAD_H 1120 #include "/usr/include/thread.h" 1121 #if defined(i386) && defined(__svr4__) && !defined(__sun) 1122 #define _THR_UNIXWARE 1124 #if defined(__SVR4) && defined(__sun) 1127 #if defined(__SVR4__) && defined(__SUN__) 1133 #ifdef HAVE_WORKING_SYS_ATOMIC_H 1134 #include <sys/atomic.h> 1136 #elif defined(HAVE_ATOMIC_AIX) 1137 #include <sys/atomic_op.h> 1143 #if defined(__cplusplus) 1144 #if defined(HAVE_GCC_BITS_ATOMIC) || defined(HAVE_GCC_CXX_BITS_ATOMIC) 1145 #include <bits/atomicity.h> 1150 #if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) ) 1156 #include <pthread.h> 1158 #ifdef HAVE_PTHREAD_NP_H 1159 #include <pthread_np.h> 1162 #ifdef HAVE_SEMAPHORE_H 1163 #include <semaphore.h> 1165 #ifdef _POSIX_PRIORITY_SCHEDULING 1169 #ifdef HAVE_SYS_SCHED_H 1170 #include <sys/sched.h> 1175 #define __PTHREAD_H__ 1176 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1177 #ifdef MUTEX_TYPE_COUNTING_FAST 1178 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1181 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1182 #ifdef PTHREAD_MUTEX_RECURSIVE 1183 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1186 #ifndef HAVE_PTHREAD_MUTEXATTR_SETTYPE 1187 #if HAVE_PTHREAD_MUTEXATTR_SETKIND_NP 1188 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1189 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1191 #define pthread_mutexattr_gettype(x, y) pthread_mutexattr_getkind_np(x, y) 1192 #define pthread_mutexattr_settype(x, y) pthread_mutexattr_setkind_np(x, y) 1194 #if HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP 1195 #ifndef PTHREAD_MUTEXTYPE_RECURSIVE 1196 #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 1198 #define pthread_mutexattr_settype(x, y) pthread_mutexattr_settype_np(x, y) 1199 #define pthread_mutexattr_gettype(x, y) pthread_mutexattr_gettype_np(x, y) 1203 #ifdef HAVE_PTHREAD_MACH_THREAD_NP 1207 #ifndef HAVE_PTHREAD_YIELD 1208 #ifdef HAVE_PTHREAD_YIELD_NP 1209 #define pthread_yield() pthread_yield_np() 1210 #define HAVE_PTHREAD_YIELD 1 1214 #ifndef HAVE_PTHREAD_YIELD 1215 #ifdef HAVE_PTHREAD_SCHED_YIELD 1216 #define pthread_yield() sched_yield() 1217 #define HAVE_PTHREAD_YIELD 1 1221 #ifndef HAVE_PTHREAD_DELAY 1222 #ifdef HAVE_PTHREAD_DELAY_NP 1223 #define HAVE_PTHREAD_DELAY 1224 #define pthread_delay(x) pthread_delay_np(x) 1226 #if defined(HAVE_PTHREAD_NANOSLEEP) 1227 #ifndef HAVE_PTHREAD_DELAY 1228 #define HAVE_PTHREAD_DELAY 1231 extern "C" int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp);
1234 #define pthread_delay(x) nanosleep(x, NULL) 1239 #ifdef HAVE_PTHREAD_ATTR_SETSTACK 1240 #ifndef PTHREAD_STACK_MIN 1241 #define PTHREAD_STACK_MIN 32768 1245 #ifndef HAVE_PTHREAD_CANCEL 1247 #define CCXX_SIG_THREAD_CANCEL SIGCANCEL 1249 #define CCXX_SIG_THREAD_CANCEL SIGQUIT 1251 #define pthread_cancel(x) pthread_kill(x, CCXX_SIG_THREAD_CANCEL) 1252 #define pthread_setcanceltype(x, y) 1253 #define pthread_setcancelstate(x, y) 1256 #ifndef HAVE_PTHREAD_SETCANCELTYPE 1257 #ifdef HAVE_PTHREAD_SETCANCEL 1259 { PTHREAD_CANCEL_ASYNCHRONOUS = CANCEL_ON,
1260 PTHREAD_CANCEL_DEFERRED = CANCEL_OFF};
1262 { PTHREAD_CANCEL_ENABLE = CANCEL_ON,
1263 PTHREAD_CANCEL_DISABLE = CANCEL_OFF};
1264 #define pthread_setcancelstate(x, y) \ 1265 (y == NULL) ? pthread_setcancel(x) : *y = pthread_setcancel 1266 #define pthread_setcanceltype(x, y) \ 1267 (y == NULL) ? pthread_setasynccancel(x) | *y = pthread_setasynccancel(x) 1269 #define pthread_setcanceltype(x, y) 1270 #define pthread_setcancelstate(x, y) 1275 #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