GNU CommonC++
config.h
Go to the documentation of this file.
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
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#define CCXX_HAVE_NEW_INIT 1
203
204/* has c++ namespaces */
205#define CCXX_NAMESPACES 1
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/* #undef ETC_CONFDIR */
227
228/* system config prefix */
229#define ETC_PREFIX "/etc/"
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#define HAVE_BITS_WORDSIZE_H 1
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/* #undef HAVE_CLOCK_GETTIME */
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#define HAVE_EXCEPTION 1
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#define HAVE_GETGRNAM_R 1
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#define HAVE_GETPAGESIZE 1
302
303/* reentrant getnam */
304#define HAVE_GETPWNAM_R 1
305
306/* reentrant getuid */
307#define HAVE_GETPWUID_R 1
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#define HAVE_LOCKF 1
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#define HAVE_MLOCKALL 1
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/* #undef HAVE_OLD_IOSTREAM */
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#define HAVE_POSIX_MEMALIGN 1
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#define HAVE_PTHREAD_CANCEL 1
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#define HAVE_PTHREAD_SETCANCELTYPE 1
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#define HAVE_SSTREAM 1
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#define HAVE_SYS_FCNTL_H 1
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#define HAVE_SYS_UN_H 1
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#define HAVE_UNIX_SOCKETS 1
653
654/* Define to 1 if you have the `wait4' function. */
655#define HAVE_WAIT4 1
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 where libtool stores uninstalled libraries. */
673#define LT_OBJDIR ".libs/"
674
675/* Name of package */
676#define CCXX_PACKAGE "commoncpp2"
677
678/* Define to the address where bug reports for this package should be sent. */
679#define CCXX_PACKAGE_BUGREPORT ""
680
681/* Define to the full name of this package. */
682#define CCXX_PACKAGE_NAME ""
683
684/* Define to the full name and version of this package. */
685#define CCXX_PACKAGE_STRING ""
686
687/* Define to the one symbol short name of this package. */
688#define CCXX_PACKAGE_TARNAME ""
689
690/* Define to the home page for this package. */
691#define CCXX_PACKAGE_URL ""
692
693/* Define to the version of this package. */
694#define CCXX_PACKAGE_CCXX_VERSION ""
695
696/* mutex type */
697#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
698
699/* Define as the return type of signal handlers (`int' or `void'). */
700#define RETSIGTYPE void
701
702/* Define to 1 if you have the ANSI C header files. */
703#define STDC_HEADERS 1
704
705/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
706#define TIME_WITH_SYS_TIME 1
707
708/* use monotonic */
709#define USE_MONOTONIC_TIMER 1
710
711/* Enable extensions on AIX 3, Interix. */
712#ifndef _ALL_SOURCE
713# define _ALL_SOURCE 1
714#endif
715/* Enable GNU extensions on systems that have them. */
716#ifndef _GNU_SOURCE
717# define _GNU_SOURCE 1
718#endif
719/* Enable threading extensions on Solaris. */
720#ifndef _POSIX_PTHREAD_SEMANTICS
721# define _POSIX_PTHREAD_SEMANTICS 1
722#endif
723/* Enable extensions on HP NonStop. */
724#ifndef _TANDEM_SOURCE
725# define _TANDEM_SOURCE 1
726#endif
727/* Enable general extensions on Solaris. */
728#ifndef __EXTENSIONS__
729# define __EXTENSIONS__ 1
730#endif
731
732
733/* Version number of package */
734#define CCXX_VERSION "1.8.1"
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#define restrict __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#define HAVE_EXCEPTION 1
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 "/etc/"
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 1
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 "/usr/include/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 PTHREAD_MUTEX_RECURSIVE_NP
1178#endif
1179#endif
1180#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
1181#ifdef PTHREAD_MUTEX_RECURSIVE
1182#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
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_MUTEX_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
u_int8_t uint8
Definition config.h:143
int64_t int64
Definition config.h:150
u_int64_t uint64
Definition config.h:151
u_int32_t uint32
Definition config.h:147
int16_t int16
Definition config.h:144
int8_t int8
Definition config.h:142
u_int16_t uint16
Definition config.h:145
int32_t int32
Definition config.h:146