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