Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 1 | /* config.h. Generated from config.h.in by configure. */ |
| 2 | /* config.h.in. Generated from configure.ac by autoheader. */ |
| 3 | |
| 4 | #ifndef CCXX_CONFIG_H_ |
| 5 | #define CCXX_CONFIG_H_ |
| 6 | #define __DLL |
| 7 | #define __EXPORT_TEMPLATE(x) |
| 8 | /* #undef CCXX_EMPTY */ |
| 9 | #define CCXX_EMPTY |
| 10 | |
| 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 |
| 22 | |
| 23 | #if __GNUC__ > 1 && !defined(__STRICT_ANSI__) && !defined(__PEDANTIC__) |
| 24 | #define DYNAMIC_LOCAL_ARRAYS |
| 25 | #endif |
| 26 | |
| 27 | #if defined(__CYGWIN__) |
| 28 | #define _POSIX_REALTIME_SIGNALS |
| 29 | #define _POSIX_THREADS |
| 30 | #endif |
| 31 | |
| 32 | #if defined(__APPLE__) && defined(__MACH__) |
| 33 | #ifndef MACOSX |
| 34 | #define MACOSX |
| 35 | #define _P1003_1B_VISIBLE |
| 36 | #endif |
| 37 | #ifndef _PTHREADS |
| 38 | #define _PTHREADS 1 |
| 39 | #endif |
| 40 | #endif |
| 41 | |
| 42 | #if defined(__FreeBSD__) |
| 43 | #ifndef __BSD_VISIBLE |
| 44 | #define __BSD_VISIBLE 1 |
| 45 | #endif |
| 46 | #endif |
| 47 | |
| 48 | #ifdef _AIX |
| 49 | #ifndef _ALL_SOURCE |
| 50 | #define _ALL_SOURCE 1 |
| 51 | #endif |
| 52 | #endif |
| 53 | |
| 54 | #ifdef __hpux |
| 55 | #ifndef _XOPEN_SOURCE_EXTENDED |
| 56 | #define _XOPEN_SOURCE_EXTENDED |
| 57 | #endif |
| 58 | #ifndef _INCLUDE_LONGLONG |
| 59 | #define _INCLUDE_LONGLONG |
| 60 | #endif |
| 61 | #endif |
| 62 | |
| 63 | #define CCXX_PACKING |
| 64 | #if defined(__GNUC__) |
| 65 | #define CCXX_PACKED |
| 66 | #elif !defined(__hpux) && !defined(_AIX) |
| 67 | #define CCXX_PACKED |
| 68 | #endif |
| 69 | |
| 70 | #if defined(__sun) || defined(__SUN__) |
| 71 | #define __EXTENSIONS__ 1 |
| 72 | #endif |
| 73 | |
| 74 | #ifndef _REENTRANT |
| 75 | #define _REENTRANT 1 |
| 76 | #endif |
| 77 | |
| 78 | #ifndef _THREAD_SAFE |
| 79 | #define _THREAD_SAFE 1 |
| 80 | #endif |
| 81 | |
| 82 | #ifndef _GNU_SOURCE |
| 83 | #define _GNU_SOURCE 1 |
| 84 | #endif |
| 85 | |
| 86 | #if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) &&!defined(__OpenBSD__) && !defined(__MACH__) && !defined(__NetBSD__) |
| 87 | #define _XOPEN_SOURCE 600 |
| 88 | #endif |
| 89 | |
| 90 | |
| 91 | |
| 92 | /* hack for BROKEN autoheader, since it will not predicitably order |
| 93 | macros by any obvious means. */ |
| 94 | |
| 95 | #define HAVE_UNISTD_H 1 |
| 96 | #define HAVE_FEATURES_H 1 |
| 97 | #define HAVE_SYS_TYPES_H 1 |
| 98 | |
| 99 | #ifdef HAVE_UNISTD_H |
| 100 | #include <unistd.h> |
| 101 | #endif |
| 102 | |
| 103 | #ifndef WIN32 |
| 104 | #ifdef HAVE_FEATURES_H |
| 105 | #include <features.h> |
| 106 | #endif |
| 107 | #endif |
| 108 | |
| 109 | #ifdef HAVE_SYS_TYPES_H |
| 110 | #include <sys/types.h> |
| 111 | #endif |
| 112 | |
| 113 | |
| 114 | |
| 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> |
| 119 | #else |
| 120 | #if HAVE_SYS_TIME_H |
| 121 | #include <sys/time.h> |
| 122 | #endif |
| 123 | #endif |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | #define HAVE_SYS_TYPES_STD 1 |
| 129 | #define HAVE_SYS_TYPES_64 1 |
| 130 | #define HAVE_LONG_LONG 1 |
| 131 | /* #undef HAVE_SYS_TYPES */ |
| 132 | |
| 133 | #ifdef HAVE_SYS_TYPES_H |
| 134 | #include <sys/types.h> |
| 135 | #endif |
| 136 | |
| 137 | #ifdef HAVE_BITS_WORSIZE_H |
| 138 | #include <bits/wordtypes.h> |
| 139 | #endif |
| 140 | |
| 141 | #ifdef HAVE_SYS_TYPES_STD |
| 142 | typedef int8_t int8; |
| 143 | typedef u_int8_t uint8; |
| 144 | typedef int16_t int16; |
| 145 | typedef u_int16_t uint16; |
| 146 | typedef int32_t int32; |
| 147 | typedef u_int32_t uint32; |
| 148 | #ifdef HAVE_SYS_TYPES_64 |
| 149 | #define HAVE_64_BITS |
| 150 | typedef int64_t int64; |
| 151 | typedef u_int64_t uint64; |
| 152 | #endif |
| 153 | #else |
| 154 | typedef char int8; |
| 155 | typedef unsigned char uint8; |
| 156 | typedef short int16; |
| 157 | typedef unsigned short uint16; |
| 158 | typedef int int32; |
| 159 | typedef unsigned int uint32; |
| 160 | #endif |
| 161 | |
| 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 |
| 168 | #define HAVE_64_BITS |
| 169 | #endif |
| 170 | #endif |
| 171 | #endif |
| 172 | |
| 173 | #ifndef HAVE_SYS_TYPES_64 |
| 174 | #ifdef __GNUC__ |
| 175 | #if defined(HAVE_LONG_LONG) || defined(_LONGLONG) |
| 176 | __extension__ |
| 177 | typedef long long int int64; |
| 178 | __extension__ |
| 179 | typedef unsigned long long int uint64; |
| 180 | #define HAVE_SYS_TYPES_64 1 |
| 181 | #define HAVE_64_BITS |
| 182 | #endif |
| 183 | #endif |
| 184 | #endif |
| 185 | |
| 186 | #ifndef HAVE_SYS_TYPES_64 |
| 187 | #if defined(HAVE_LONG_LONG) || defined(_LONGLONG) |
| 188 | #define HAVE_64_BITS |
| 189 | typedef long long int64; |
| 190 | typedef unsigned long long uint64; |
| 191 | #endif |
| 192 | #endif |
| 193 | |
| 194 | |
| 195 | /* has c++ exception handling */ |
| 196 | #define CCXX_EXCEPTIONS 1 |
| 197 | |
| 198 | /* define gnutls */ |
| 199 | /* #undef CCXX_GNUTLS */ |
| 200 | |
| 201 | /* have new with init */ |
| 202 | /* #undef CCXX_HAVE_NEW_INIT */ |
| 203 | |
| 204 | /* has c++ namespaces */ |
| 205 | /* #undef CCXX_NAMESPACES */ |
| 206 | |
| 207 | /* NAT support */ |
| 208 | #define CCXX_NAT 1 |
| 209 | |
| 210 | /* define openssl */ |
| 211 | /* #undef CCXX_OPENSSL */ |
| 212 | |
| 213 | /* defines ssl */ |
| 214 | /* #undef CCXX_SSL */ |
| 215 | |
| 216 | /* aix fixes needed */ |
| 217 | /* #undef COMMON_AIX_FIXES */ |
| 218 | |
| 219 | /* enable auditing */ |
| 220 | /* #undef COMMON_MEMORY_AUDIT */ |
| 221 | |
| 222 | /* cygwin environment */ |
| 223 | /* #undef CYGWIN_IMPORTS */ |
| 224 | |
| 225 | /* primary config prefix */ |
| 226 | #define ETC_CONFDIR "/home/evigier/android-ndk-r8b/platforms/android-14/arch-arm/usr/etc/" |
| 227 | |
| 228 | /* system config prefix */ |
| 229 | /* #undef ETC_PREFIX */ |
| 230 | |
| 231 | /* Define to 1 if you have the <alloca.h> header file. */ |
| 232 | #define HAVE_ALLOCA_H 1 |
| 233 | |
| 234 | /* Define to 1 if you have the <arpa/inet.h> header file. */ |
| 235 | #define HAVE_ARPA_INET_H 1 |
| 236 | |
| 237 | /* atomic aix operations */ |
| 238 | /* #undef HAVE_ATOMIC_AIX */ |
| 239 | |
| 240 | /* Define to 1 if you have the <bits/atomicity.h> header file. */ |
| 241 | /* #undef HAVE_BITS_ATOMICITY_H */ |
| 242 | |
| 243 | /* Define to 1 if you have the <bits/wordsize.h> header file. */ |
| 244 | /* #undef HAVE_BITS_WORDSIZE_H */ |
| 245 | |
| 246 | /* have bool type */ |
| 247 | #define HAVE_BOOL_TYPE 1 |
| 248 | |
| 249 | /* Define to 1 if you have the <bsd/signal.h> header file. */ |
| 250 | /* #undef HAVE_BSD_SIGNAL_H */ |
| 251 | |
| 252 | /* Define to 1 if you have the `clock_gettime' function. */ |
| 253 | #define HAVE_CLOCK_GETTIME 1 |
| 254 | |
| 255 | /* Define to 1 if you have the <dlfcn.h> header file. */ |
| 256 | #define HAVE_DLFCN_H 1 |
| 257 | |
| 258 | /* have endian header */ |
| 259 | #define HAVE_ENDIAN_H 1 |
| 260 | |
| 261 | /* Define to 1 if you have the <errno.h> header file. */ |
| 262 | #define HAVE_ERRNO_H 1 |
| 263 | |
| 264 | /* Define to 1 if you have the <exception> header file. */ |
| 265 | /* #undef HAVE_EXCEPTION */ |
| 266 | |
| 267 | /* Enable extras */ |
| 268 | #define HAVE_EXTRAS 1 |
| 269 | |
| 270 | /* Define to 1 if you have the <fcntl.h> header file. */ |
| 271 | #define HAVE_FCNTL_H 1 |
| 272 | |
| 273 | /* Define to 1 if you have the <features.h> header file. */ |
| 274 | #define HAVE_FEATURES_H 1 |
| 275 | |
| 276 | /* has gcc atomic functions */ |
| 277 | /* #undef HAVE_GCC_BITS_ATOMIC */ |
| 278 | |
| 279 | /* has __gnu_cxx atomic functions */ |
| 280 | /* #undef HAVE_GCC_CXX_BITS_ATOMIC */ |
| 281 | |
| 282 | /* getaddrinfo interface support */ |
| 283 | #define HAVE_GETADDRINFO 1 |
| 284 | |
| 285 | /* reentrant getgrnam */ |
| 286 | /* #undef HAVE_GETGRNAM_R */ |
| 287 | |
| 288 | /* ipv6 host lookup */ |
| 289 | #define HAVE_GETHOSTBYNAME2 1 |
| 290 | |
| 291 | /* have getopt header */ |
| 292 | #define HAVE_GETOPT 1 |
| 293 | |
| 294 | /* Define to 1 if you have the <getopt.h> header file. */ |
| 295 | #define HAVE_GETOPT_H 1 |
| 296 | |
| 297 | /* Define to 1 if you have the `getopt_long' function. */ |
| 298 | #define HAVE_GETOPT_LONG 1 |
| 299 | |
| 300 | /* Define to 1 if you have the `getpagesize' function. */ |
| 301 | /* #undef HAVE_GETPAGESIZE */ |
| 302 | |
| 303 | /* reentrant getnam */ |
| 304 | /* #undef HAVE_GETPWNAM_R */ |
| 305 | |
| 306 | /* reentrant getuid */ |
| 307 | /* #undef HAVE_GETPWUID_R */ |
| 308 | |
| 309 | /* Define to 1 if you have the `gettimeofday' function. */ |
| 310 | #define HAVE_GETTIMEOFDAY 1 |
| 311 | |
| 312 | /* have hires */ |
| 313 | #define HAVE_HIRES_TIMER 1 |
| 314 | |
| 315 | /* has inet_aton */ |
| 316 | #define HAVE_INET_ATON 1 |
| 317 | |
| 318 | /* ipv6 support */ |
| 319 | #define HAVE_INET_PTON 1 |
| 320 | |
| 321 | /* inet sockets */ |
| 322 | #define HAVE_INET_SOCKETS 1 |
| 323 | |
| 324 | /* Define to 1 if you have the <inttypes.h> header file. */ |
| 325 | #define HAVE_INTTYPES_H 1 |
| 326 | |
| 327 | /* Define to 1 if you have the <ioctl.h> header file. */ |
| 328 | /* #undef HAVE_IOCTL_H */ |
| 329 | |
| 330 | /* Define to 1 if you have the <ip_compat.h> header file. */ |
| 331 | /* #undef HAVE_IP_COMPAT_H */ |
| 332 | |
| 333 | /* Define to 1 if you have the <ip_fil_compat.h> header file. */ |
| 334 | /* #undef HAVE_IP_FIL_COMPAT_H */ |
| 335 | |
| 336 | /* Define to 1 if you have the <ip_fil.h> header file. */ |
| 337 | /* #undef HAVE_IP_FIL_H */ |
| 338 | |
| 339 | /* Define to 1 if you have the <ip_nat.h> header file. */ |
| 340 | /* #undef HAVE_IP_NAT_H */ |
| 341 | |
| 342 | /* Define to 1 if you have the `malloc' library (-lmalloc). */ |
| 343 | /* #undef HAVE_LIBMALLOC */ |
| 344 | |
| 345 | /* Define to 1 if you have the <limits.h> header file. */ |
| 346 | #define HAVE_LIMITS_H 1 |
| 347 | |
| 348 | /* Define to 1 if you have the <linux/in6.h> header file. */ |
| 349 | #define HAVE_LINUX_IN6_H 1 |
| 350 | |
| 351 | /* Define to 1 if you have the <linux/netfilter_ipv4.h> header file. */ |
| 352 | #define HAVE_LINUX_NETFILTER_IPV4_H 1 |
| 353 | |
| 354 | /* Define to 1 if you have the <linux/netfilter_ipv6.h> header file. */ |
| 355 | #define HAVE_LINUX_NETFILTER_IPV6_H 1 |
| 356 | |
| 357 | /* reentrant localtime */ |
| 358 | #define HAVE_LOCALTIME_R 1 |
| 359 | |
| 360 | /* Define to 1 if you have the `lockf' function. */ |
| 361 | /* #undef HAVE_LOCKF */ |
| 362 | |
| 363 | /* have long longs */ |
| 364 | #define HAVE_LONG_LONG 1 |
| 365 | |
| 366 | /* Define to 1 if you have the `lstat' function. */ |
| 367 | #define HAVE_LSTAT 1 |
| 368 | |
| 369 | /* mach dybloader */ |
| 370 | /* #undef HAVE_MACH_DYLD */ |
| 371 | |
| 372 | /* Define to 1 if you have the <mach-o/dyld.h> header file. */ |
| 373 | /* #undef HAVE_MACH_O_DYLD_H */ |
| 374 | |
| 375 | /* Define to 1 if you have the `memmove' function. */ |
| 376 | #define HAVE_MEMMOVE 1 |
| 377 | |
| 378 | /* Define to 1 if you have the <memory.h> header file. */ |
| 379 | #define HAVE_MEMORY_H 1 |
| 380 | |
| 381 | /* Define to 1 if you have the `mlock' function. */ |
| 382 | #define HAVE_MLOCK 1 |
| 383 | |
| 384 | /* Define to 1 if you have the `mlockall' function. */ |
| 385 | /* #undef HAVE_MLOCKALL */ |
| 386 | |
| 387 | /* support for plugin modules */ |
| 388 | #define HAVE_MODULES 1 |
| 389 | |
| 390 | /* IPF NAT support */ |
| 391 | /* #undef HAVE_NAT_IPF */ |
| 392 | |
| 393 | /* NetFilter NAT support */ |
| 394 | #define HAVE_NAT_NETFILTER 1 |
| 395 | |
| 396 | /* PF NAT support */ |
| 397 | /* #undef HAVE_NAT_PF */ |
| 398 | |
| 399 | /* Define to 1 if you have the <netinet6/in6.h> header file. */ |
| 400 | /* #undef HAVE_NETINET6_IN6_H */ |
| 401 | |
| 402 | /* Define to 1 if you have the <netinet/inet.h> header file. */ |
| 403 | /* #undef HAVE_NETINET_INET_H */ |
| 404 | |
| 405 | /* Define to 1 if you have the <netinet/in.h> header file. */ |
| 406 | #define HAVE_NETINET_IN_H 1 |
| 407 | |
| 408 | /* Define to 1 if you have the <netinet/in_systm.h> header file. */ |
| 409 | #define HAVE_NETINET_IN_SYSTM_H 1 |
| 410 | |
| 411 | /* Define to 1 if you have the <netinet/ip_compat.h> header file. */ |
| 412 | /* #undef HAVE_NETINET_IP_COMPAT_H */ |
| 413 | |
| 414 | /* Define to 1 if you have the <netinet/ip_fil_compat.h> header file. */ |
| 415 | /* #undef HAVE_NETINET_IP_FIL_COMPAT_H */ |
| 416 | |
| 417 | /* Define to 1 if you have the <netinet/ip_fil.h> header file. */ |
| 418 | /* #undef HAVE_NETINET_IP_FIL_H */ |
| 419 | |
| 420 | /* Define to 1 if you have the <netinet/ip.h> header file. */ |
| 421 | #define HAVE_NETINET_IP_H 1 |
| 422 | |
| 423 | /* Define to 1 if you have the <netinet/ip_nat.h> header file. */ |
| 424 | /* #undef HAVE_NETINET_IP_NAT_H */ |
| 425 | |
| 426 | /* Define to 1 if you have the <net/if.h> header file. */ |
| 427 | #define HAVE_NET_IF_H 1 |
| 428 | |
| 429 | /* Define to 1 if you have the <net/pfvar.h> header file. */ |
| 430 | /* #undef HAVE_NET_PFVAR_H */ |
| 431 | |
| 432 | /* old style iostreams */ |
| 433 | #define HAVE_OLD_IOSTREAM 1 |
| 434 | |
| 435 | /* Define to 1 if you have the `poll' function. */ |
| 436 | #define HAVE_POLL 1 |
| 437 | |
| 438 | /* Define to 1 if you have the <poll.h> header file. */ |
| 439 | #define HAVE_POLL_H 1 |
| 440 | |
| 441 | /* Define to 1 if you have the `posix_memalign' function. */ |
| 442 | /* #undef HAVE_POSIX_MEMALIGN */ |
| 443 | |
| 444 | /* has pwrite */ |
| 445 | #define HAVE_PREAD_PWRITE 1 |
| 446 | |
| 447 | /* has stack size */ |
| 448 | #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 |
| 449 | |
| 450 | /* has cancel */ |
| 451 | /* #undef HAVE_PTHREAD_CANCEL */ |
| 452 | |
| 453 | /* has non portable delay */ |
| 454 | /* #undef HAVE_PTHREAD_DELAY_NP */ |
| 455 | |
| 456 | /* posix thread header */ |
| 457 | #define HAVE_PTHREAD_H 1 |
| 458 | |
| 459 | /* has mach link */ |
| 460 | /* #undef HAVE_PTHREAD_MACH_THREAD_NP */ |
| 461 | |
| 462 | /* has non portable setkind */ |
| 463 | /* #undef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP */ |
| 464 | |
| 465 | /* has setttype */ |
| 466 | #define HAVE_PTHREAD_MUTEXATTR_SETTYPE 1 |
| 467 | |
| 468 | /* has non portable settype */ |
| 469 | /* #undef HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP */ |
| 470 | |
| 471 | /* has nanosleep */ |
| 472 | #define HAVE_PTHREAD_NANOSLEEP 1 |
| 473 | |
| 474 | /* Define to 1 if you have the <pthread_np.h> header file. */ |
| 475 | /* #undef HAVE_PTHREAD_NP_H */ |
| 476 | |
| 477 | /* has rwlock support */ |
| 478 | #define HAVE_PTHREAD_RWLOCK 1 |
| 479 | |
| 480 | /* has sched yield */ |
| 481 | #define HAVE_PTHREAD_SCHED_YIELD 1 |
| 482 | |
| 483 | /* has setcancel */ |
| 484 | /* #undef HAVE_PTHREAD_SETCANCEL */ |
| 485 | |
| 486 | /* has setcanceltype */ |
| 487 | /* #undef HAVE_PTHREAD_SETCANCELTYPE */ |
| 488 | |
| 489 | /* has suspend */ |
| 490 | /* #undef HAVE_PTHREAD_SUSPEND */ |
| 491 | |
| 492 | /* has yield */ |
| 493 | /* #undef HAVE_PTHREAD_YIELD */ |
| 494 | |
| 495 | /* has np yield */ |
| 496 | /* #undef HAVE_PTHREAD_YIELD_NP */ |
| 497 | |
| 498 | /* reentrant readdir */ |
| 499 | #define HAVE_READDIR_R 1 |
| 500 | |
| 501 | /* Define to 1 if you have the `realpath' function. */ |
| 502 | #define HAVE_REALPATH 1 |
| 503 | |
| 504 | /* Define to 1 if you have the `sched_getscheduler' function. */ |
| 505 | #define HAVE_SCHED_GETSCHEDULER 1 |
| 506 | |
| 507 | /* Define to 1 if you have the <sched.h> header file. */ |
| 508 | #define HAVE_SCHED_H 1 |
| 509 | |
| 510 | /* Define to 1 if you have the <select.h> header file. */ |
| 511 | /* #undef HAVE_SELECT_H */ |
| 512 | |
| 513 | /* Define to 1 if you have the <semaphore.h> header file. */ |
| 514 | #define HAVE_SEMAPHORE_H 1 |
| 515 | |
| 516 | /* Define to 1 if you have the `setegid' function. */ |
| 517 | #define HAVE_SETEGID 1 |
| 518 | |
| 519 | /* Define to 1 if you have the `setenv' function. */ |
| 520 | #define HAVE_SETENV 1 |
| 521 | |
| 522 | /* Define to 1 if you have the `setitimer' function. */ |
| 523 | #define HAVE_SETITIMER 1 |
| 524 | |
| 525 | /* Define to 1 if you have the `setpgrp' function. */ |
| 526 | #define HAVE_SETPGRP 1 |
| 527 | |
| 528 | /* have shload plugins */ |
| 529 | /* #undef HAVE_SHL_LOAD */ |
| 530 | |
| 531 | /* Define to 1 if you have the `sigaction' function. */ |
| 532 | #define HAVE_SIGACTION 1 |
| 533 | |
| 534 | /* Define to 1 if you have the `sigwait' function. */ |
| 535 | #define HAVE_SIGWAIT 1 |
| 536 | |
| 537 | /* 2 argument form */ |
| 538 | #define HAVE_SIGWAIT2 1 |
| 539 | |
| 540 | /* Define to 1 if you have the `snprintf' function. */ |
| 541 | #define HAVE_SNPRINTF 1 |
| 542 | |
| 543 | /* has socklen_t type */ |
| 544 | #define HAVE_SOCKLEN_T 1 |
| 545 | |
| 546 | /* Define to 1 if you have the <sstream> header file. */ |
| 547 | /* #undef HAVE_SSTREAM */ |
| 548 | |
| 549 | /* Define to 1 if you have the <ss.h> header file. */ |
| 550 | /* #undef HAVE_SS_H */ |
| 551 | |
| 552 | /* Define to 1 if you have the <stdint.h> header file. */ |
| 553 | #define HAVE_STDINT_H 1 |
| 554 | |
| 555 | /* Define to 1 if you have the <stdlib.h> header file. */ |
| 556 | #define HAVE_STDLIB_H 1 |
| 557 | |
| 558 | /* Define to 1 if you have the `strcasecmp' function. */ |
| 559 | #define HAVE_STRCASECMP 1 |
| 560 | |
| 561 | /* Define to 1 if you have the `strdup' function. */ |
| 562 | #define HAVE_STRDUP 1 |
| 563 | |
| 564 | /* reentrant strerror */ |
| 565 | #define HAVE_STRERROR_R 1 |
| 566 | |
| 567 | /* Define to 1 if you have the <strings.h> header file. */ |
| 568 | #define HAVE_STRINGS_H 1 |
| 569 | |
| 570 | /* Define to 1 if you have the <string.h> header file. */ |
| 571 | #define HAVE_STRING_H 1 |
| 572 | |
| 573 | /* reentrant strtok */ |
| 574 | #define HAVE_STRTOK_R 1 |
| 575 | |
| 576 | /* Define to 1 if you have the <syslog.h> header file. */ |
| 577 | #define HAVE_SYSLOG_H 1 |
| 578 | |
| 579 | /* Define to 1 if you have the <syslog.hposix_evlog.h> header file. */ |
| 580 | /* #undef HAVE_SYSLOG_HPOSIX_EVLOG_H */ |
| 581 | |
| 582 | /* Define to 1 if you have the <sys/atomic.h> header file. */ |
| 583 | /* #undef HAVE_SYS_ATOMIC_H */ |
| 584 | |
| 585 | /* Define to 1 if you have the <sys/atomic_op.h> header file. */ |
| 586 | /* #undef HAVE_SYS_ATOMIC_OP_H */ |
| 587 | |
| 588 | /* Define to 1 if you have the <sys/fcntl.h> header file. */ |
| 589 | /* #undef HAVE_SYS_FCNTL_H */ |
| 590 | |
| 591 | /* Define to 1 if you have the <sys/file.h> header file. */ |
| 592 | #define HAVE_SYS_FILE_H 1 |
| 593 | |
| 594 | /* Define to 1 if you have the <sys/ioctl.h> header file. */ |
| 595 | #define HAVE_SYS_IOCTL_H 1 |
| 596 | |
| 597 | /* solaris endian */ |
| 598 | /* #undef HAVE_SYS_ISA_DEFS_H */ |
| 599 | |
| 600 | /* Define to 1 if you have the <sys/libcsys.h> header file. */ |
| 601 | /* #undef HAVE_SYS_LIBCSYS_H */ |
| 602 | |
| 603 | /* Define to 1 if you have the <sys/param.h> header file. */ |
| 604 | #define HAVE_SYS_PARAM_H 1 |
| 605 | |
| 606 | /* Define to 1 if you have the <sys/poll.h> header file. */ |
| 607 | #define HAVE_SYS_POLL_H 1 |
| 608 | |
| 609 | /* Define to 1 if you have the <sys/sched.h> header file. */ |
| 610 | /* #undef HAVE_SYS_SCHED_H */ |
| 611 | |
| 612 | /* Define to 1 if you have the <sys/select.h> header file. */ |
| 613 | #define HAVE_SYS_SELECT_H 1 |
| 614 | |
| 615 | /* Define to 1 if you have the <sys/socket.h> header file. */ |
| 616 | #define HAVE_SYS_SOCKET_H 1 |
| 617 | |
| 618 | /* Define to 1 if you have the <sys/sockio.h> header file. */ |
| 619 | /* #undef HAVE_SYS_SOCKIO_H */ |
| 620 | |
| 621 | /* Define to 1 if you have the <sys/stat.h> header file. */ |
| 622 | #define HAVE_SYS_STAT_H 1 |
| 623 | |
| 624 | /* Define to 1 if you have the <sys/stream.h> header file. */ |
| 625 | /* #undef HAVE_SYS_STREAM_H */ |
| 626 | |
| 627 | /* Define to 1 if you have the <sys/time.h> header file. */ |
| 628 | #define HAVE_SYS_TIME_H 1 |
| 629 | |
| 630 | /* have 64 bit longs */ |
| 631 | #define HAVE_SYS_TYPES_64 1 |
| 632 | |
| 633 | /* Define to 1 if you have the <sys/types.h> header file. */ |
| 634 | #define HAVE_SYS_TYPES_H 1 |
| 635 | |
| 636 | /* have systypes */ |
| 637 | #define HAVE_SYS_TYPES_STD 1 |
| 638 | |
| 639 | /* Define to 1 if you have the <sys/un.h> header file. */ |
| 640 | /* #undef HAVE_SYS_UN_H */ |
| 641 | |
| 642 | /* Define to 1 if you have the <sys/wait.h> header file. */ |
| 643 | #define HAVE_SYS_WAIT_H 1 |
| 644 | |
| 645 | /* Define to 1 if you have the <thread.h> header file. */ |
| 646 | /* #undef HAVE_THREAD_H */ |
| 647 | |
| 648 | /* Define to 1 if you have the <unistd.h> header file. */ |
| 649 | #define HAVE_UNISTD_H 1 |
| 650 | |
| 651 | /* has unix domain sockets */ |
| 652 | /* #undef HAVE_UNIX_SOCKETS */ |
| 653 | |
| 654 | /* Define to 1 if you have the `wait4' function. */ |
| 655 | /* #undef HAVE_WAIT4 */ |
| 656 | |
| 657 | /* Define to 1 if you have the `waitpid' function. */ |
| 658 | #define HAVE_WAITPID 1 |
| 659 | |
| 660 | /* Define to 1 if you have the <winsock2.h> header file. */ |
| 661 | /* #undef HAVE_WINSOCK2_H */ |
| 662 | |
| 663 | /* Define to 1 if you have the <winsock.h> header file. */ |
| 664 | /* #undef HAVE_WINSOCK_H */ |
| 665 | |
| 666 | /* has usable atomic functions */ |
| 667 | /* #undef HAVE_WORKING_SYS_ATOMIC_H */ |
| 668 | |
| 669 | /* have zlib header */ |
| 670 | #define HAVE_ZLIB_H 1 |
| 671 | |
| 672 | /* Define to the sub-directory in which libtool stores uninstalled libraries. |
| 673 | */ |
| 674 | #define LT_OBJDIR ".libs/" |
| 675 | |
| 676 | /* Name of package */ |
| 677 | #define PACKAGE "commoncpp2" |
| 678 | |
| 679 | /* Define to the address where bug reports for this package should be sent. */ |
| 680 | #define PACKAGE_BUGREPORT "" |
| 681 | |
| 682 | /* Define to the full name of this package. */ |
| 683 | #define PACKAGE_NAME "" |
| 684 | |
| 685 | /* Define to the full name and version of this package. */ |
| 686 | #define PACKAGE_STRING "" |
| 687 | |
| 688 | /* Define to the one symbol short name of this package. */ |
| 689 | #define PACKAGE_TARNAME "" |
| 690 | |
| 691 | /* Define to the home page for this package. */ |
| 692 | #define PACKAGE_URL "" |
| 693 | |
| 694 | /* Define to the version of this package. */ |
| 695 | #define PACKAGE_VERSION "" |
| 696 | |
| 697 | /* mutex type */ |
| 698 | #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP |
| 699 | |
| 700 | /* Define as the return type of signal handlers (`int' or `void'). */ |
| 701 | #define RETSIGTYPE void |
| 702 | |
| 703 | /* Define to 1 if you have the ANSI C header files. */ |
| 704 | #define STDC_HEADERS 1 |
| 705 | |
| 706 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ |
| 707 | #define TIME_WITH_SYS_TIME 1 |
| 708 | |
| 709 | /* use monotonic */ |
| 710 | #define USE_MONOTONIC_TIMER 1 |
| 711 | |
| 712 | /* Enable extensions on AIX 3, Interix. */ |
| 713 | #ifndef _ALL_SOURCE |
| 714 | # define _ALL_SOURCE 1 |
| 715 | #endif |
| 716 | /* Enable GNU extensions on systems that have them. */ |
| 717 | #ifndef _GNU_SOURCE |
| 718 | # define _GNU_SOURCE 1 |
| 719 | #endif |
| 720 | /* Enable threading extensions on Solaris. */ |
| 721 | #ifndef _POSIX_PTHREAD_SEMANTICS |
| 722 | # define _POSIX_PTHREAD_SEMANTICS 1 |
| 723 | #endif |
| 724 | /* Enable extensions on HP NonStop. */ |
| 725 | #ifndef _TANDEM_SOURCE |
| 726 | # define _TANDEM_SOURCE 1 |
| 727 | #endif |
| 728 | /* Enable general extensions on Solaris. */ |
| 729 | #ifndef __EXTENSIONS__ |
| 730 | # define __EXTENSIONS__ 1 |
| 731 | #endif |
| 732 | |
| 733 | |
| 734 | /* Version number of package */ |
| 735 | #define VERSION "1.8.1" |
| 736 | |
| 737 | /* bsd system using linuxthreads */ |
| 738 | /* #undef WITH_LINUXTHREADS */ |
| 739 | |
| 740 | /* darwin6 environment */ |
| 741 | /* #undef _DARWIN6_ */ |
| 742 | |
| 743 | /* Define to 1 if on MINIX. */ |
| 744 | /* #undef _MINIX */ |
| 745 | |
| 746 | /* Define to 2 if the system does not provide POSIX.1 features except with |
| 747 | this defined. */ |
| 748 | /* #undef _POSIX_1_SOURCE */ |
| 749 | |
| 750 | /* Define to 1 if you need to in order for `stat' and other things to work. */ |
| 751 | /* #undef _POSIX_SOURCE */ |
| 752 | |
| 753 | /* endian byte order */ |
| 754 | /* #undef __BYTE_ORDER */ |
| 755 | |
| 756 | /* Define to `__inline__' or `__inline' if that's what the C compiler |
| 757 | calls it, or to nothing if 'inline' is not supported under any name. */ |
| 758 | #ifndef __cplusplus |
| 759 | /* #undef inline */ |
| 760 | #endif |
| 761 | |
| 762 | /* Define to the equivalent of the C99 'restrict' keyword, or to |
| 763 | nothing if this is not supported. Do not define if restrict is |
| 764 | supported directly. */ |
| 765 | #define restrict __restrict |
| 766 | /* Work around a bug in Sun C++: it does not support _Restrict or |
| 767 | __restrict__, even though the corresponding Sun C compiler ends up with |
| 768 | "#define restrict _Restrict" or "#define restrict __restrict__" in the |
| 769 | previous line. Perhaps some future version of Sun C++ will work with |
| 770 | restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ |
| 771 | #if defined __SUNPRO_CC && !defined __RESTRICT |
| 772 | # define _Restrict |
| 773 | # define __restrict__ |
| 774 | #endif |
| 775 | |
| 776 | /* Define to empty if the keyword `volatile' does not work. Warning: valid |
| 777 | code using `volatile' can become incorrect without. Disable with care. */ |
| 778 | /* #undef volatile */ |
| 779 | |
| 780 | |
| 781 | |
| 782 | #ifndef HAVE_STRERROR_R |
| 783 | #define strerror_r(e, b, l) b = ::strerror(e) |
| 784 | #endif |
| 785 | |
| 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) |
| 789 | #endif |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | #ifdef HAVE_POLL_H |
| 795 | #include <poll.h> |
| 796 | #else |
| 797 | #ifdef HAVE_SYS_POLL_H |
| 798 | #include <sys/poll.h> |
| 799 | #endif |
| 800 | #endif |
| 801 | |
| 802 | #if defined(HAVE_POLL) && defined(POLLRDNORM) |
| 803 | #define USE_POLL |
| 804 | #endif |
| 805 | |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | #ifdef HAVE_SYS_LIBCSYS_H |
| 811 | #include <sys/libcsys.h> |
| 812 | #endif |
| 813 | |
| 814 | #ifdef HAVE_WINSOCK2_H |
| 815 | #include <winsock2.h> |
| 816 | #else |
| 817 | #ifdef HAVE_WINSOCK_H |
| 818 | #include <winsock.h> |
| 819 | #else |
| 820 | #ifdef HAVE_SYS_SOCKET_H |
| 821 | #include <sys/socket.h> |
| 822 | #ifdef HAVE_SELECT_H |
| 823 | #include <select.h> |
| 824 | #else |
| 825 | #ifdef HAVE_SYS_SELECT_H |
| 826 | #include <sys/select.h> |
| 827 | #endif |
| 828 | #endif |
| 829 | |
| 830 | #ifdef HAVE_NETINET_IN_H |
| 831 | #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) |
| 832 | /* #undef _XOPEN_SOURCE_EXTENDED */ |
| 833 | #endif |
| 834 | #include <netinet/in.h> |
| 835 | #ifdef __hpux |
| 836 | #define _XOPEN_SOURCE_EXTENDED |
| 837 | #endif |
| 838 | #endif |
| 839 | #ifdef HAVE_ARPA_INET_H |
| 840 | #include <arpa/inet.h> |
| 841 | #include <netdb.h> |
| 842 | #endif |
| 843 | |
| 844 | #ifdef HAVE_NETINET6_IN6_H |
| 845 | #include <netinet6/in6.h> |
| 846 | #endif |
| 847 | |
| 848 | #ifdef HAVE_LINIX_IN6_H |
| 849 | #include <linux/in6.h> |
| 850 | #endif |
| 851 | |
| 852 | #ifdef HAVE_NETINET_IN_SYSTM_H |
| 853 | #include <netinet/in_systm.h> |
| 854 | #endif |
| 855 | #ifdef HAVE_NETINET_IP_H |
| 856 | #include <netinet/ip.h> |
| 857 | #endif |
| 858 | #ifdef HAVE_SYS_UN_H |
| 859 | #include <sys/un.h> |
| 860 | #endif |
| 861 | #endif |
| 862 | #endif |
| 863 | #endif |
| 864 | |
| 865 | #ifndef HAVE_INET_ATON |
| 866 | #define inet_aton(cp, addr) (((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1) |
| 867 | #endif |
| 868 | |
| 869 | #ifndef SUN_LEN |
| 870 | #ifdef SCM_RIGHTS |
| 871 | #define HAVE_UN_LEN |
| 872 | #endif |
| 873 | #ifdef __linux__ |
| 874 | #define HAVE_UN_LEN |
| 875 | #endif |
| 876 | #ifdef HAVE_UN_LEN |
| 877 | #define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1 |
| 878 | #else |
| 879 | #define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) + strlen((ptr)->sun_path)) |
| 880 | #endif |
| 881 | #endif |
| 882 | |
| 883 | #ifndef _OSF_SOURCE |
| 884 | #ifndef HAVE_SOCKLEN_T |
| 885 | #if defined(i386) && defined(__svr4__) |
| 886 | #define HAVE_SOCKLEN_U |
| 887 | #else |
| 888 | #if defined(__CYGWIN32__) |
| 889 | #define socklen_t int |
| 890 | #else |
| 891 | typedef int socklen_t; |
| 892 | #endif |
| 893 | #endif |
| 894 | |
| 895 | #ifdef HAVE_SOCKLEN_U |
| 896 | #if !defined(__CYGWIN32__) && !defined(__MINGW32__) |
| 897 | typedef unsigned socklen_t; |
| 898 | #else |
| 899 | typedef int socklen_t; |
| 900 | #endif |
| 901 | #endif |
| 902 | #endif |
| 903 | #endif |
| 904 | |
| 905 | #ifdef __hpux |
| 906 | #ifdef mutable |
| 907 | /* #undef mutable */ |
| 908 | #endif |
| 909 | #endif |
| 910 | |
| 911 | #if defined(AF_INET6) && defined(HAVE_INET_PTON) |
| 912 | #define CCXX_IPV6 |
| 913 | #endif |
| 914 | |
| 915 | #define CCXX_MULTIFAMILY_IP |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | #ifndef HAVE_BOOL_TYPE |
| 921 | typedef enum { true=1, false=0 } bool; |
| 922 | #endif |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | #ifndef CCXX_EXCEPTIONS |
| 929 | /* disable HAVE_EXCEPTION */ |
| 930 | #ifdef HAVE_EXCEPTION |
| 931 | /* #undef HAVE_EXCEPTION */ |
| 932 | #endif |
| 933 | /* throw - replacement to throw an exception */ |
| 934 | #define THROW(x) abort() |
| 935 | /* throw - replacement to declare an exception */ |
| 936 | #define THROWS(x) |
| 937 | /* throw - for empty list */ |
| 938 | #define NEW_THROWS |
| 939 | #define THROWS_EMPTY |
| 940 | /* |
| 941 | * work around dangeling if/else combinations: |
| 942 | */ |
| 943 | #else |
| 944 | #define THROW(x) throw x |
| 945 | #define THROWS(x) throw(x) |
| 946 | #define NEW_THROWS throw() |
| 947 | #define THROWS_EMPTY throw() |
| 948 | #endif |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | #ifdef CCXX_NAMESPACES |
| 954 | #define USING(x) using namespace x; |
| 955 | #else |
| 956 | #define USING(x) |
| 957 | #endif |
| 958 | |
| 959 | #ifdef __KCC |
| 960 | #define KAI_NONSTD_IOSTREAM 1 |
| 961 | #endif |
| 962 | |
| 963 | |
| 964 | |
| 965 | |
| 966 | #ifdef HAVE_SS_H |
| 967 | #include <ss.h> |
| 968 | #define COMMON_SECURE |
| 969 | #endif |
| 970 | |
| 971 | #define COMMON_NAMESPACE ost |
| 972 | #define NAMESPACE_COMMON namespace ost { |
| 973 | #define END_NAMESPACE } |
| 974 | |
| 975 | #ifdef HAVE_VISIBILITY |
| 976 | #define __EXPORT __attribute__ ((visibility("default"))) |
| 977 | #define __DLLRTL __attribute__ ((visibility("default"))) |
| 978 | #define __LOCAL __attribute__ ((visibility("hidden"))) |
| 979 | #else |
| 980 | #define __EXPORT |
| 981 | #define __DLLRTL |
| 982 | #define __LOCAL |
| 983 | #endif |
| 984 | |
| 985 | #ifndef ETC_PREFIX |
| 986 | #ifdef WIN32 |
| 987 | #define ETC_PREFIX "C:\\WINDOWS\\" |
| 988 | #endif |
| 989 | |
| 990 | #ifndef ETC_PREFIX |
| 991 | #define ETC_PREFIX "/etc/" |
| 992 | #endif |
| 993 | #endif |
| 994 | |
| 995 | #endif |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | #ifndef HAVE_FCNTL_H |
| 1002 | #ifdef HAVE_SYS_FCNTL_H |
| 1003 | #include <sys/fcntl.h> |
| 1004 | #endif |
| 1005 | #else |
| 1006 | #include <fcntl.h> |
| 1007 | #ifndef O_NDELAY |
| 1008 | #ifdef HAVE_SYS_FCNTL_H |
| 1009 | #include <sys/fcntl.h> |
| 1010 | #endif |
| 1011 | #endif |
| 1012 | #endif |
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 | #if defined(HAVE_ENDIAN_H) |
| 1017 | #include <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 |
| 1022 | #else |
| 1023 | #define __BYTE_ORDER 4321 |
| 1024 | #endif |
| 1025 | #if _ALIGNMENT_REQUIRED > 0 |
| 1026 | #define __BYTE_ALIGNMENT _MAX_ALIGNMENT |
| 1027 | #else |
| 1028 | #define __BYTE_ALIGNMENT 1 |
| 1029 | #endif |
| 1030 | #endif |
| 1031 | |
| 1032 | #ifndef __LITTLE_ENDIAN |
| 1033 | #define __LITTLE_ENDIAN 1234 |
| 1034 | #define __BIG_ENDIAN 4321 |
| 1035 | #endif |
| 1036 | |
| 1037 | #ifndef __BYTE_ORDER |
| 1038 | #define __BYTE_ORDER 1234 |
| 1039 | #endif |
| 1040 | |
| 1041 | #ifndef __BYTE_ALIGNMENT |
| 1042 | #if defined(SPARC) || defined(sparc) |
| 1043 | #if defined(__arch64__) || defined(__sparcv9) |
| 1044 | #define __BYTE_ALIGNMENT 8 |
| 1045 | #else |
| 1046 | #define __BYTE_ALIGNMENT 4 |
| 1047 | #endif |
| 1048 | #endif |
| 1049 | #endif |
| 1050 | |
| 1051 | #ifndef __BYTE_ALIGNMENT |
| 1052 | #define __BYTE_ALIGNMENT 1 |
| 1053 | #endif |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | #ifdef HAVE_SIGACTION |
| 1059 | #ifdef HAVE_BSD_SIGNAL_H |
| 1060 | /* #undef HAVE_BSD_SIGNAL_H */ |
| 1061 | #endif |
| 1062 | #endif |
| 1063 | |
| 1064 | /* Cause problem with Solaris... and perhaps Digital Unix? |
| 1065 | However, the autoconf test in ost_signal defines _POSIX_PTHREAD_SEMANTICS |
| 1066 | when trying to compile sigwait2. */ |
| 1067 | |
| 1068 | #ifdef HAVE_SIGWAIT2 |
| 1069 | #ifndef _POSIX_PTHREAD_SEMANTICS |
| 1070 | #define _POSIX_PTHREAD_SEMANTICS 1 |
| 1071 | #endif |
| 1072 | #endif |
| 1073 | |
| 1074 | #ifdef HAVE_BSD_SIGNAL_H |
| 1075 | #include <bsd/signal.h> |
| 1076 | #else |
| 1077 | #include <signal.h> |
| 1078 | #endif |
| 1079 | #ifndef SA_ONESHOT |
| 1080 | #define SA_ONESHOT SA_RESETHAND |
| 1081 | #endif |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | #include <cstring> |
| 1087 | #ifdef HAVE_STRINGS_H |
| 1088 | #ifndef _AIX |
| 1089 | #include <strings.h> |
| 1090 | #endif |
| 1091 | #endif |
| 1092 | |
| 1093 | #ifdef HAVE_ALLOCA_H |
| 1094 | #include <alloca.h> |
| 1095 | #endif |
| 1096 | |
| 1097 | #ifndef HAVE_SNPRINTF |
| 1098 | #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1400 |
| 1099 | #define snprintf _snprintf |
| 1100 | #define vsnprintf _vsnprintf |
| 1101 | #endif |
| 1102 | #endif |
| 1103 | |
| 1104 | #ifdef HAVE_STRCASECMP |
| 1105 | #ifndef stricmp |
| 1106 | #define stricmp(x,y) strcasecmp(x,y) |
| 1107 | #endif |
| 1108 | #ifndef strnicmp |
| 1109 | #define strnicmp(x,y,n) strncasecmp(x,y,n) |
| 1110 | #endif |
| 1111 | #ifndef stristr |
| 1112 | #define stristr(x, y) strcasestr(x,y) |
| 1113 | #endif |
| 1114 | #endif |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | #ifdef HAVE_THREAD_H |
| 1120 | #include "@thrprefix@/thread.h" |
| 1121 | #if defined(i386) && defined(__svr4__) && !defined(__sun) |
| 1122 | #define _THR_UNIXWARE |
| 1123 | #endif |
| 1124 | #if defined(__SVR4) && defined(__sun) |
| 1125 | #define _THR_SUNOS5 |
| 1126 | #else |
| 1127 | #if defined(__SVR4__) && defined(__SUN__) |
| 1128 | #define _THR_SUNOS5 |
| 1129 | #endif |
| 1130 | #endif |
| 1131 | #endif |
| 1132 | |
| 1133 | #ifdef HAVE_WORKING_SYS_ATOMIC_H |
| 1134 | #include <sys/atomic.h> |
| 1135 | #define HAVE_ATOMIC |
| 1136 | #elif defined(HAVE_ATOMIC_AIX) |
| 1137 | #include <sys/atomic_op.h> |
| 1138 | #ifndef HAVE_ATOMIC |
| 1139 | #define HAVE_ATOMIC |
| 1140 | #endif |
| 1141 | #endif |
| 1142 | |
| 1143 | #if defined(__cplusplus) |
| 1144 | #if defined(HAVE_GCC_BITS_ATOMIC) || defined(HAVE_GCC_CXX_BITS_ATOMIC) |
| 1145 | #include <bits/atomicity.h> |
| 1146 | #define HAVE_ATOMIC |
| 1147 | #endif |
| 1148 | #endif |
| 1149 | |
| 1150 | #if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) ) |
| 1151 | |
| 1152 | #ifdef __QNX__ |
| 1153 | #define __EXT_QNX |
| 1154 | #endif |
| 1155 | |
| 1156 | #include <pthread.h> |
| 1157 | |
| 1158 | #ifdef HAVE_PTHREAD_NP_H |
| 1159 | #include <pthread_np.h> |
| 1160 | #endif |
| 1161 | |
| 1162 | #ifdef HAVE_SEMAPHORE_H |
| 1163 | #include <semaphore.h> |
| 1164 | #endif |
| 1165 | #ifdef _POSIX_PRIORITY_SCHEDULING |
| 1166 | #ifdef HAVE_SCHED_H |
| 1167 | #include <sched.h> |
| 1168 | #else |
| 1169 | #ifdef HAVE_SYS_SCHED_H |
| 1170 | #include <sys/sched.h> |
| 1171 | #endif |
| 1172 | #endif |
| 1173 | #endif |
| 1174 | |
| 1175 | #define __PTHREAD_H__ |
| 1176 | #ifndef PTHREAD_MUTEXTYPE_RECURSIVE |
| 1177 | #ifdef MUTEX_TYPE_COUNTING_FAST |
| 1178 | #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP |
| 1179 | #endif |
| 1180 | #endif |
| 1181 | #ifndef PTHREAD_MUTEXTYPE_RECURSIVE |
| 1182 | #ifdef PTHREAD_MUTEX_RECURSIVE |
| 1183 | #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP |
| 1184 | #endif |
| 1185 | #endif |
| 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 |
| 1190 | #endif |
| 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) |
| 1193 | #endif |
| 1194 | #if HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP |
| 1195 | #ifndef PTHREAD_MUTEXTYPE_RECURSIVE |
| 1196 | #define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP |
| 1197 | #endif |
| 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) |
| 1200 | #endif |
| 1201 | #endif |
| 1202 | |
| 1203 | #ifdef HAVE_PTHREAD_MACH_THREAD_NP |
| 1204 | #define _THR_MACH |
| 1205 | #endif |
| 1206 | |
| 1207 | #ifndef HAVE_PTHREAD_YIELD |
| 1208 | #ifdef HAVE_PTHREAD_YIELD_NP |
| 1209 | #define pthread_yield() pthread_yield_np() |
| 1210 | #define HAVE_PTHREAD_YIELD |
| 1211 | #endif |
| 1212 | #endif |
| 1213 | |
| 1214 | #ifndef HAVE_PTHREAD_YIELD |
| 1215 | #ifdef HAVE_PTHREAD_SCHED_YIELD |
| 1216 | #define pthread_yield() sched_yield() |
| 1217 | #define HAVE_PTHREAD_YIELD |
| 1218 | #endif |
| 1219 | #endif |
| 1220 | |
| 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) |
| 1225 | #endif |
| 1226 | #if defined(HAVE_PTHREAD_NANOSLEEP) |
| 1227 | #ifndef HAVE_PTHREAD_DELAY |
| 1228 | #define HAVE_PTHREAD_DELAY |
| 1229 | #ifdef __FreeBSD__ |
| 1230 | #ifdef __cplusplus |
| 1231 | extern "C" int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); |
| 1232 | #endif |
| 1233 | #endif |
| 1234 | #define pthread_delay(x) nanosleep(x, NULL) |
| 1235 | #endif |
| 1236 | #endif |
| 1237 | #endif |
| 1238 | |
| 1239 | #ifdef HAVE_PTHREAD_ATTR_SETSTACK |
| 1240 | #ifndef PTHREAD_STACK_MIN |
| 1241 | #define PTHREAD_STACK_MIN 32768 |
| 1242 | #endif |
| 1243 | #endif |
| 1244 | |
| 1245 | #ifndef HAVE_PTHREAD_CANCEL |
| 1246 | #ifdef SIGCANCEL |
| 1247 | #define CCXX_SIG_THREAD_CANCEL SIGCANCEL |
| 1248 | #else |
| 1249 | #define CCXX_SIG_THREAD_CANCEL SIGQUIT |
| 1250 | #endif |
| 1251 | #define pthread_cancel(x) pthread_kill(x, CCXX_SIG_THREAD_CANCEL) |
| 1252 | #define pthread_setcanceltype(x, y) |
| 1253 | #define pthread_setcancelstate(x, y) |
| 1254 | #endif |
| 1255 | |
| 1256 | #ifndef HAVE_PTHREAD_SETCANCELTYPE |
| 1257 | #ifdef HAVE_PTHREAD_SETCANCEL |
| 1258 | enum |
| 1259 | { PTHREAD_CANCEL_ASYNCHRONOUS = CANCEL_ON, |
| 1260 | PTHREAD_CANCEL_DEFERRED = CANCEL_OFF}; |
| 1261 | enum |
| 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) |
| 1268 | #else |
| 1269 | #define pthread_setcanceltype(x, y) |
| 1270 | #define pthread_setcancelstate(x, y) |
| 1271 | #endif |
| 1272 | #endif |
| 1273 | |
| 1274 | #ifdef _AIX |
| 1275 | #ifdef HAVE_PTHREAD_SUSPEND |
| 1276 | /* #undef HAVE_PTHREAD_SUSPEND */ |
| 1277 | #endif |
| 1278 | #endif |
| 1279 | |
| 1280 | #endif |
| 1281 | |
| 1282 | |
| 1283 | |