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