1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578
|
/*
** This file has been automatically generated by 'acconfig' from aclocal.m4
** Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
**
** This file is free software; as a special exception the author gives
** unlimited permission to copy and/or distribute it, with or without
** modifications, as long as this notice is preserved.
**
** This program is distributed in the hope that it will be useful, but
** WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef CCXX_CONFIG_H_
#define CCXX_CONFIG_H_
#if defined(__APPLE__) && defined(__MACH__)
#define MACOSX
#define _PTHREADS 1
#endif
#if defined(__FreeBSD__)
#define __BSD_VISIBLE 1
#endif
/* This is the top section */
@TOP@
/* This is the template section */
/* And now the rest of the boys */
#define __DLL
#define __EXPORT
#define __DLLRTL
/* FIXME: old macro, should be removed */
#define __MEMBER_EXPORT
#undef CCXX_EMPTY
#define CCXX_EMPTY
#define CCXX_EXPORT(t) t
#define CCXX_MEMBER(t) t
#define CCXX_MEMBER_EXPORT(t) t
#define CCXX_CLASS_EXPORT
#undef HAVE_ENDIAN_H
#undef __BYTE_ORDER
#undef WITH_LINUXTHREADS
#undef HAVE_SYS_FCNTL_H
#undef HAVE_FCNTL_H
#undef HAVE_SYS_TYPES_STD
#undef HAVE_SYS_TYPES_64
#undef HAVE_LONG_LONG
#undef HAVE_64_BITS
#undef HAVE_SYS_TYPES_H
#undef HAVE_SIGWAIT
#undef HAVE_SIGWAIT2
#undef HAVE_SIGACTION
#undef HAVE_BSD_SIGNAL_H
#undef HAVE_SETITIMER
#undef HAVE_STRCASECMP
#undef HAVE_STRDUP
#undef HAVE_SHL_LOAD
#undef HAVE_MACH_DYLD
#undef HAVE_MEMMOVE
#undef HAVE_STRINGS_H
#undef HAVE_GETOPT_LONG
#undef HAVE_GETOPT_H
#undef HAVE_DLOPEN
#undef HAVE_MODULES
#undef HAVE_DLFCN_H
#undef HAVE_SCHED_GETSCHEDULER
#undef PTHREAD_MUTEXTYPE_RECURSIVE
#undef HAVE_PTHREAD_SUSPEND
#undef HAVE_PTHREAD_MUTEXATTR_SETTYPE
#undef HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP
#undef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
#undef HAVE_PTHREAD_DELAY_NP
#undef HAVE_PTHREAD_SCHED_YIELD
#undef HAVE_PTHREAD_YIELD
#undef HAVE_PTHREAD_NANOSLEEP
#undef HAVE_PTHREAD_CANCEL
#undef HAVE_PTHREAD_SETCANCELTYPE
#undef HAVE_PTHREAD_SETCANCEL
#undef HAVE_PTHREAD_RWLOCK
#undef HAVE_PREAD_PWRITE
#undef HAVE_SYS_ATOMIC_H
#undef HAVE_WORKING_SYS_ATOMIC_H
#undef HAVE_SEMAPHORE_H
#undef COMMON_AIX_FIXES
#undef HAVE_FEATURES_H
#undef HAVE_SYS_TIME_H
#undef TIME_WITH_SYS_TIME
#undef HAVE_STRTOK_R
#undef HAVE_LOCALTIME_R
#undef HAVE_SETENV
#define _POSIX_PII_SOCKET
#undef HAVE_SYS_SOCKET_H
#undef HAVE_ARPA_INET_H
#undef HAVE_NETINET_IN_SYSTM_H
#undef HAVE_NETINET_IP_H
#undef HAVE_SYS_UN_H
#undef HAVE_SELECT_H
#undef HAVE_SYS_SELECT_H
#undef HAVE_INET_ATON
#undef HAVE_INET_SOCKETS
#undef HAVE_UNIX_SOCKETS
#undef HAVE_SOCKLEN_T
#undef HAVE_SYS_LIBCSYS_H
#undef HAVE_SYS_STREAM_H
#undef HAVE_SYS_POLL_H
#undef HAVE_POLL_H
#undef HAVE_ZLIB_H
#undef HAVE_LIBXML
#undef COMMON_MEMORY_AUDIT
#undef COMMON_XML_PARSING
#undef COMMON_FTP_SUPPORT
#undef CCXX_HAVE_NEW_INIT
#undef HAVE_OLD_IOSTREAM
#undef CCXX_NAMESPACES
#undef HAVE_BOOL_TYPE
#undef HAVE_EXCEPTION_HANDLING
#undef HAVE_EXCEPTION
#undef COMMON_SECURE
#undef HAVE_SS_H
#undef CYGWIN_IMPORTS
@BOTTOM@
#define COMMON_ASYNC_OVERRIDE
#define COMMON_OST_NAMESPACE
#define COMMON_THREAD_SLEEP
#define COMMON_NET_DEVICES
#ifdef _AIX
#ifndef _ALL_SOURCE
#define _ALL_SOURCE
#endif
#ifdef HAVE_PTHREAD_SUSPEND
#undef HAVE_PTHREAD_SUSPEND
#endif
#endif
#ifndef _REENTRANT
#define _REENTRANT 1
#endif
#ifndef _THREAD_SAFE
#define _THREAD_SAFE 1
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__)
#define _XOPEN_SOURCE 500
#endif
// Cause problem with Solaris... and perhaps Digital Unix?
// However, the autoconf test in ost_signal defines _POSIX_PTHREAD_SEMANTICS
// when trying to compile sigwait2.
#ifdef HAVE_SIGWAIT2
#define _POSIX_PTHREAD_SEMANTICS
#endif
#ifdef __hpux
#ifdef HAVE_ARPA_INET_H
#include <netinet/inet.h>
#endif
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#endif
#ifdef mutable
#undef mutable
#endif
#endif
#ifdef HAVE_FEATURES_H
#include <features.h>
#endif
/* This is the bottom section */
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#else
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#endif
#if defined(__sun) || defined(__SUN__)
#define __EXTENSIONS__ 1
#endif
#ifndef HAVE_FCNTL_H
#ifdef HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif
#else
#include <fcntl.h>
#ifndef O_NDELAY
#ifdef HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif
#endif
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TYPES_STD
typedef int8_t int8;
typedef u_int8_t uint8;
typedef int16_t int16;
typedef u_int16_t uint16;
typedef int32_t int32;
typedef u_int32_t uint32;
#ifdef HAVE_SYS_TYPES_64
#define HAVE_64_BITS
typedef int64_t int64;
typedef u_int64_t uint64;
#endif
#else
typedef char int8;
typedef unsigned char uint8;
typedef short int16;
typedef unsigned short uint16;
typedef int int32;
typedef unsigned int uint32;
#endif
#ifndef HAVE_SYS_TYPES_64
#if defined(HAVE_LONG_LONG) || defined(_LONGLONG)
#define HAVE_64_BITS
typedef long long int64;
typedef unsigned long long uint64;
#else
#ifdef __arch64__
#define HAVE_64_BITS
typedef long int int64;
typedef unsigned long int uint64;
#endif
#endif
#endif
#ifdef HAVE_SS_H
#include <ss.h>
#define COMMON_SECURE
#endif
#ifdef HAVE_SIGACTION
#ifdef HAVE_BSD_SIGNAL_H
#undef HAVE_BSD_SIGNAL_H
#endif
#endif
#ifdef HAVE_BSD_SIGNAL_H
#include <bsd/signal.h>
#else
#include <signal.h>
#endif
#ifndef SA_ONESHOT
#define SA_ONESHOT SA_RESETHAND
#endif
#include <string.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#ifndef HAVE_MEMMOVE
#define memmove(d, s, l) memcpy(d, s, l)
#endif
#ifdef HAVE_STRCASECMP
#ifndef stricmp
#define stricmp(x,y) strcasecmp(x,y)
#endif
#ifndef strnicmp
#define strnicmp(x,y,n) strncasecmp(x,y,n)
#endif
#endif
#ifndef HAVE_STRDUP
#define strdup(s) (char *)malloc(strlen(s))
#endif
#ifdef HAVE_THREAD_H
#include "@thrprefix@/thread.h"
#if defined(i386) && defined(__svr4__) && !defined(__sun)
#define _THR_UNIXWARE
#endif
#if defined(__SVR4) && defined(__sun)
#define _THR_SUNOS5
#else
#if defined(__SVR4__) && defined(__SUN__)
#define _THR_SUNOS5
#endif
#endif
#endif
#ifdef HAVE_WORKING_SYS_ATOMIC_H
#include <sys/atomic.h>
#define HAVE_ATOMIC
#endif
#if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) )
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
#ifdef HAVE_SEMAPHORE_H
#include <semaphore.h>
#endif
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifdef HAVE_SCHED_H
#include <sched.h>
#else
#ifdef HAVE_SYS_SCHED_H
#include <sys/sched.h>
#endif
#endif
#endif
#define __PTHREAD_H__
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#ifdef MUTEX_TYPE_COUNTING_FAST
#define PTHREAD_MUTEXTYPE_RECURSIVE MUTEX_TYPE_COUNTING_FAST
#endif
#endif
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#ifdef PTHREAD_MUTEX_RECURSIVE
#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE
#endif
#endif
#ifndef HAVE_PTHREAD_MUTEXATTR_SETTYPE
#if HAVE_PTHREAD_MUTEXATTR_SETKIND_NP
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
#endif
#define pthread_mutexattr_gettype(x, y) pthread_mutexattr_getkind_np(x, y)
#define pthread_mutexattr_settype(x, y) pthread_mutexattr_setkind_np(x, y)
#endif
#if HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEXTYPE_RECURSIVE_NP
#endif
#define pthread_mutexattr_settype(x, y) pthread_mutexattr_settype_np(x, y)
#define pthread_mutexattr_gettype(x, y) pthread_mutexattr_gettype_np(x, y)
#endif
#endif
#ifndef HAVE_PTHREAD_YIELD
#ifdef HAVE_PTHREAD_SCHED_YIELD
#define pthread_yield() sched_yield()
#define HAVE_PTHREAD_YIELD
#endif
#endif
#ifndef HAVE_PTHREAD_DELAY
#ifdef HAVE_PTHREAD_DELAY_NP
#define HAVE_PTHREAD_DELAY
#define pthread_delay(x) pthread_delay_np(x)
#endif
#ifdef HAVE_PTHREAD_NANOSLEEP
#ifndef HAVE_PTHREAD_DELAY
#define HAVE_PTHREAD_DELAY
#ifdef __FreeBSD__
extern "C" int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
#endif
#define pthread_delay(x) nanosleep(x, NULL)
#endif
#endif
#endif
#ifdef HAVE_PTHREAD_ATTR_SETSTACK
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 32768
#endif
#endif
#ifndef HAVE_PTHREAD_CANCEL
#ifdef SIGCANCEL
#define CCXX_SIG_THREAD_CANCEL SIGCANCEL
#else
#define CCXX_SIG_THREAD_CANCEL SIGQUIT
#endif
#define pthread_cancel(x) pthread_kill(x, CCXX_SIG_THREAD_CANCEL)
#endif
#ifndef HAVE_PTHREAD_SETCANCELTYPE
#ifdef HAVE_PTHREAD_SETCANCEL
enum
{ PTHREAD_CANCEL_ASYNCHRONOUS = CANCEL_ON,
PTHREAD_CANCEL_DEFERRED = CANCEL_OFF};
enum
{ PTHREAD_CANCEL_ENABLE = CANCEL_ON,
PTHREAD_CANCEL_DISABLE = CANCEL_OFF};
#define pthread_setcancelstate(x, y) \
(y == NULL) ? pthread_setcancel(x) : *y = pthread_setcancel
#define pthread_setcanceltype(x, y) \
(y == NULL) ? pthread_setasynccancel(x) | *y = pthread_setasynccancel(x)
#else
#define pthread_setcanceltype(x, y)
#define pthread_setcancelstate(x, y)
#endif
#endif
#endif
#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifndef HAVE_STRTOK_R
#define strtok_r(s, d, r) strtok(s, d)
#endif
#ifndef HAVE_LOCALTIME_R
#define localtime_r(t, b) localtime(t)
#define ctime_r(t, b) ctime(t)
#define gmtime_r(t, b) gmtime(t)
#define asctime_r(t, b) asctime(t)
#endif
#ifdef HAVE_SYS_LIBCSYS_H
#include <sys/libcsys.h>
#endif
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#else
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#ifdef HAVE_SELECT_H
#include <select.h>
#else
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif
#ifdef HAVE_ARPA_INET_H
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#endif
#endif
#ifndef HAVE_INET_ATON
#define inet_aton(cp, addr) \
(((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1)
#endif
#ifndef SUN_LEN
#ifdef SCM_RIGHTS
#define HAVE_UN_LEN
#endif
#ifdef __linux__
#define HAVE_UN_LEN
#endif
#ifdef HAVE_UN_LEN
#define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + \
sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1
#else
#define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) \
+ strlen((ptr)->sun_path))
#endif
#endif
#ifndef HAVE_SOCKLEN_T
#if defined(i386) && defined(__svr4__)
#define HAVE_SOCKLEN_U
#else
#if defined(__CYGWIN32__)
#define socklen_t int
#else
typedef int socklen_t;
#endif
#endif
#ifdef HAVE_SOCKLEN_U
#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
typedef unsigned socklen_t;
#else
typedef int socklen_t;
#endif
#endif
#endif
#ifdef HAVE_POLL_H
#include <poll.h>
#else
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
#endif
/**
** define these after the last system header has been included
** so that these do not interfere with them.
**/
// Add bool support if missing
#ifndef HAVE_BOOL_TYPE
typedef enum { true=1, false=0 } bool;
#endif
// replace 'throw' with abort for libs on broken C++
#ifndef HAVE_EXCEPTION_HANDLING
/* disable HAVE_EXCEPTION */
#ifdef HAVE_EXCEPTION
#undef HAVE_EXCEPTION
#endif
/* throw - replacement to throw an exception */
#define THROW(x) abort()
/* throw - replacement to declare an exception */
#define THROWS(x)
/*
* work around dangeling if/else combinations:
*/
#define try if(0) ; else
#define catch(x) if(1) ; else
#else
#define THROW(x) throw x
#define THROWS(x) throw(x)
#endif
#ifdef CCXX_NAMESPACES
#define USING(x) using namespace x;
#else
#define USING(x)
#endif
#ifdef __KCC
#define KAI_NONSTD_IOSTREAM 1
#endif
#ifdef __FreeBSD__
#define ETC_PREFIX "@USR_PREFIX@/etc/"
#endif
#ifndef ETC_PREFIX
#define ETC_PREFIX "/etc/"
#endif
#ifdef _MSC_VER
#pragma warning ( disable : 4335 ) // 'this' used in base init
#endif
#endif
|