00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef APR_H
00019 #define APR_H
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 #if !defined(__GNUC__) || __GNUC__ < 2 || \
00060 (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
00061 defined(NEXT)
00062 #ifndef __attribute__
00063 #define __attribute__(__x)
00064 #endif
00065 #define APR_INLINE
00066 #define APR_HAS_INLINE 0
00067 #else
00068 #define APR_INLINE __inline__
00069 #define APR_HAS_INLINE 1
00070 #endif
00071
00072 #define APR_HAVE_ARPA_INET_H 1
00073 #define APR_HAVE_CONIO_H 0
00074 #define APR_HAVE_CRYPT_H 1
00075 #define APR_HAVE_CTYPE_H 1
00076 #define APR_HAVE_DIRENT_H 1
00077 #define APR_HAVE_ERRNO_H 1
00078 #define APR_HAVE_FCNTL_H 1
00079 #define APR_HAVE_IO_H 0
00080 #define APR_HAVE_LIMITS_H 1
00081 #define APR_HAVE_NETDB_H 1
00082 #define APR_HAVE_NETINET_IN_H 1
00083 #define APR_HAVE_NETINET_SCTP_H 1
00084 #define APR_HAVE_NETINET_SCTP_UIO_H 0
00085 #define APR_HAVE_NETINET_TCP_H 1
00086 #define APR_HAVE_PROCESS_H 0
00087 #define APR_HAVE_PTHREAD_H 1
00088 #define APR_HAVE_SEMAPHORE_H 1
00089 #define APR_HAVE_SIGNAL_H 1
00090 #define APR_HAVE_STDARG_H 1
00091 #define APR_HAVE_STDINT_H 1
00092 #define APR_HAVE_STDIO_H 1
00093 #define APR_HAVE_STDLIB_H 1
00094 #define APR_HAVE_STRING_H 1
00095 #define APR_HAVE_STRINGS_H 1
00096 #define APR_HAVE_SYS_IOCTL_H 1
00097 #define APR_HAVE_SYS_SENDFILE_H 1
00098 #define APR_HAVE_SYS_SIGNAL_H 1
00099 #define APR_HAVE_SYS_SOCKET_H 1
00100 #define APR_HAVE_SYS_SOCKIO_H 0
00101 #define APR_HAVE_SYS_SYSLIMITS_H 0
00102 #define APR_HAVE_SYS_TIME_H 1
00103 #define APR_HAVE_SYS_TYPES_H 1
00104 #define APR_HAVE_SYS_UIO_H 1
00105 #define APR_HAVE_SYS_UN_H 1
00106 #define APR_HAVE_SYS_WAIT_H 1
00107 #define APR_HAVE_TIME_H 1
00108 #define APR_HAVE_UNISTD_H 1
00109 #define APR_HAVE_WINDOWS_H 0
00110 #define APR_HAVE_WINSOCK2_H 0
00111
00112
00113
00114
00115
00116
00117
00118
00119 #if APR_HAVE_WINDOWS_H && defined(WIN32)
00120
00121
00122
00123 #ifndef _WINDOWS_
00124
00125 #ifndef WIN32_LEAN_AND_MEAN
00126 #define WIN32_LEAN_AND_MEAN
00127 #endif
00128
00129 #ifndef _WIN32_WINNT
00130
00131
00132 #define _WIN32_WINNT 0x0501
00133 #endif
00134
00135 #ifndef NOUSER
00136 #define NOUSER
00137 #endif
00138 #ifndef NOMCX
00139 #define NOMCX
00140 #endif
00141 #ifndef NOIME
00142 #define NOIME
00143 #endif
00144
00145 #include <windows.h>
00146
00147
00148
00149
00150
00151 #define SW_HIDE 0
00152 #ifndef _WIN32_WCE
00153 #include <winsock2.h>
00154 #include <ws2tcpip.h>
00155 #include <mswsock.h>
00156 #else
00157 #include <winsock.h>
00158 #endif
00159
00160 #endif
00161 #endif
00162
00163 #if APR_HAVE_SYS_TYPES_H
00164 #include <sys/types.h>
00165 #endif
00166
00167 #if APR_HAVE_SYS_SOCKET_H
00168 #include <sys/socket.h>
00169 #endif
00170
00171 #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
00172
00173
00174 #define __STDC_CONSTANT_MACROS
00175 #endif
00176
00177 #if APR_HAVE_STDINT_H
00178 #include <stdint.h>
00179 #endif
00180
00181 #if APR_HAVE_SYS_WAIT_H
00182 #include <sys/wait.h>
00183 #endif
00184
00185 #ifdef OS2
00186 #define INCL_DOS
00187 #define INCL_DOSERRORS
00188 #include <os2.h>
00189 #endif
00190
00191
00192 #if APR_HAVE_LIMITS_H
00193 #include <limits.h>
00194 #else
00195 #if APR_HAVE_SYS_SYSLIMITS_H
00196 #include <sys/syslimits.h>
00197 #endif
00198 #endif
00199
00200
00201 #ifdef __cplusplus
00202 extern "C" {
00203 #endif
00204
00205
00206
00207
00208
00209
00210
00211 #define APR_HAVE_SHMEM_MMAP_TMP 1
00212 #define APR_HAVE_SHMEM_MMAP_SHM 1
00213 #define APR_HAVE_SHMEM_MMAP_ZERO 1
00214 #define APR_HAVE_SHMEM_SHMGET_ANON 1
00215 #define APR_HAVE_SHMEM_SHMGET 1
00216 #define APR_HAVE_SHMEM_MMAP_ANON 1
00217 #define APR_HAVE_SHMEM_BEOS 0
00218
00219 #define APR_USE_SHMEM_MMAP_TMP 0
00220 #define APR_USE_SHMEM_MMAP_SHM 1
00221 #define APR_USE_SHMEM_MMAP_ZERO 0
00222 #define APR_USE_SHMEM_SHMGET_ANON 0
00223 #define APR_USE_SHMEM_SHMGET 0
00224 #define APR_USE_SHMEM_MMAP_ANON 1
00225 #define APR_USE_SHMEM_BEOS 0
00226
00227 #define APR_USE_FLOCK_SERIALIZE 0
00228 #define APR_USE_SYSVSEM_SERIALIZE 0
00229 #define APR_USE_POSIXSEM_SERIALIZE 0
00230 #define APR_USE_FCNTL_SERIALIZE 0
00231 #define APR_USE_PROC_PTHREAD_SERIALIZE 1
00232 #define APR_USE_PTHREAD_SERIALIZE 1
00233
00234 #define APR_HAS_FLOCK_SERIALIZE 1
00235 #define APR_HAS_SYSVSEM_SERIALIZE 1
00236 #define APR_HAS_POSIXSEM_SERIALIZE 1
00237 #define APR_HAS_FCNTL_SERIALIZE 1
00238 #define APR_HAS_PROC_PTHREAD_SERIALIZE 1
00239
00240 #define APR_PROCESS_LOCK_IS_GLOBAL 0
00241
00242 #define APR_HAVE_CORKABLE_TCP 1
00243 #define APR_HAVE_GETRLIMIT 1
00244 #define APR_HAVE_IN_ADDR 1
00245 #define APR_HAVE_INET_ADDR 1
00246 #define APR_HAVE_INET_NETWORK 1
00247 #define APR_HAVE_IPV6 1
00248 #define APR_HAVE_SOCKADDR_UN 1
00249 #define APR_HAVE_MEMMOVE 1
00250 #define APR_HAVE_SETRLIMIT 1
00251 #define APR_HAVE_SIGACTION 1
00252 #define APR_HAVE_SIGSUSPEND 1
00253 #define APR_HAVE_SIGWAIT 1
00254 #define APR_HAVE_SA_STORAGE 1
00255 #define APR_HAVE_STRCASECMP 1
00256 #define APR_HAVE_STRDUP 1
00257 #define APR_HAVE_STRICMP 0
00258 #define APR_HAVE_STRNCASECMP 1
00259 #define APR_HAVE_STRNICMP 0
00260 #define APR_HAVE_STRSTR 1
00261 #define APR_HAVE_MEMCHR 1
00262 #define APR_HAVE_STRUCT_RLIMIT 1
00263 #define APR_HAVE_UNION_SEMUN 0
00264 #define APR_HAVE_SCTP 0
00265 #define APR_HAVE_IOVEC 1
00266
00267
00268 #define APR_HAS_SHARED_MEMORY 1
00269 #define APR_HAS_THREADS 1
00270 #define APR_HAS_SENDFILE 1
00271 #define APR_HAS_MMAP 1
00272 #define APR_HAS_FORK 1
00273 #define APR_HAS_RANDOM 1
00274 #define APR_HAS_OTHER_CHILD 1
00275 #define APR_HAS_DSO 1
00276 #define APR_HAS_SO_ACCEPTFILTER 0
00277 #define APR_HAS_UNICODE_FS 0
00278 #define APR_HAS_PROC_INVOKED 0
00279 #define APR_HAS_USER 1
00280 #define APR_HAS_LARGE_FILES 1
00281 #define APR_HAS_XTHREAD_FILES 0
00282 #define APR_HAS_OS_UUID 1
00283
00284 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
00285
00286
00287
00288
00289 #define APR_FILES_AS_SOCKETS 1
00290
00291
00292
00293 #define APR_CHARSET_EBCDIC 0
00294
00295
00296
00297
00298 #define APR_TCP_NOPUSH_FLAG TCP_CORK
00299
00300
00301
00302 #define APR_TCP_NODELAY_INHERITED 1
00303
00304
00305
00306 #define APR_O_NONBLOCK_INHERITED 0
00307
00308
00309
00310 typedef unsigned char apr_byte_t;
00311
00312 typedef short apr_int16_t;
00313 typedef unsigned short apr_uint16_t;
00314
00315 typedef int apr_int32_t;
00316 typedef unsigned int apr_uint32_t;
00317
00318 #define APR_SIZEOF_VOIDP 4
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335 #ifdef DARWIN_10
00336 #undef APR_SIZEOF_VOIDP
00337 #undef INT64_C
00338 #undef UINT64_C
00339 #ifdef __LP64__
00340 typedef long apr_int64_t;
00341 typedef unsigned long apr_uint64_t;
00342 #define APR_SIZEOF_VOIDP 8
00343 #define INT64_C(v) (v ## L)
00344 #define UINT64_C(v) (v ## UL)
00345 #else
00346 typedef long long apr_int64_t;
00347 typedef unsigned long long apr_uint64_t;
00348 #define APR_SIZEOF_VOIDP 4
00349 #define INT64_C(v) (v ## LL)
00350 #define UINT64_C(v) (v ## ULL)
00351 #endif
00352 #else
00353 typedef long long apr_int64_t;
00354 typedef unsigned long long apr_uint64_t;
00355 #endif
00356
00357 typedef size_t apr_size_t;
00358 typedef ssize_t apr_ssize_t;
00359 typedef off64_t apr_off_t;
00360 typedef socklen_t apr_socklen_t;
00361 typedef unsigned long apr_ino_t;
00362
00363 #if APR_SIZEOF_VOIDP == 8
00364 typedef apr_uint64_t apr_uintptr_t;
00365 #else
00366 typedef apr_uint32_t apr_uintptr_t;
00367 #endif
00368
00369
00370 #define APR_IS_BIGENDIAN 0
00371
00372
00373 #define APR_INT64_C(val) INT64_C(val)
00374 #define APR_UINT64_C(val) UINT64_C(val)
00375
00376 #ifdef INT16_MIN
00377 #define APR_INT16_MIN INT16_MIN
00378 #else
00379 #define APR_INT16_MIN (-0x7fff - 1)
00380 #endif
00381
00382 #ifdef INT16_MAX
00383 #define APR_INT16_MAX INT16_MAX
00384 #else
00385 #define APR_INT16_MAX (0x7fff)
00386 #endif
00387
00388 #ifdef UINT16_MAX
00389 #define APR_UINT16_MAX UINT16_MAX
00390 #else
00391 #define APR_UINT16_MAX (0xffff)
00392 #endif
00393
00394 #ifdef INT32_MIN
00395 #define APR_INT32_MIN INT32_MIN
00396 #else
00397 #define APR_INT32_MIN (-0x7fffffff - 1)
00398 #endif
00399
00400 #ifdef INT32_MAX
00401 #define APR_INT32_MAX INT32_MAX
00402 #else
00403 #define APR_INT32_MAX 0x7fffffff
00404 #endif
00405
00406 #ifdef UINT32_MAX
00407 #define APR_UINT32_MAX UINT32_MAX
00408 #else
00409 #define APR_UINT32_MAX (0xffffffffU)
00410 #endif
00411
00412 #ifdef INT64_MIN
00413 #define APR_INT64_MIN INT64_MIN
00414 #else
00415 #define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
00416 #endif
00417
00418 #ifdef INT64_MAX
00419 #define APR_INT64_MAX INT64_MAX
00420 #else
00421 #define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
00422 #endif
00423
00424 #ifdef UINT64_MAX
00425 #define APR_UINT64_MAX UINT64_MAX
00426 #else
00427 #define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
00428 #endif
00429
00430 #define APR_SIZE_MAX (~((apr_size_t)0))
00431
00432
00433
00434
00435
00436
00437
00438 #ifdef __cplusplus
00439 #define APR_BEGIN_DECLS extern "C" {
00440 #define APR_END_DECLS }
00441 #else
00442 #define APR_BEGIN_DECLS
00443 #define APR_END_DECLS
00444 #endif
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455 #define APR_THREAD_FUNC
00456
00457 #if defined(DOXYGEN) || !defined(WIN32)
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480 #define APR_DECLARE(type) __attribute__ ((visibility ("default"))) type
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493 #define APR_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509 #define APR_DECLARE_DATA __attribute__ ((visibility ("default")))
00510
00511 #elif defined(APR_DECLARE_STATIC)
00512 #define APR_DECLARE(type) type __stdcall
00513 #define APR_DECLARE_NONSTD(type) type __cdecl
00514 #define APR_DECLARE_DATA
00515 #elif defined(APR_DECLARE_EXPORT)
00516 #define APR_DECLARE(type) __declspec(dllexport) type __stdcall
00517 #define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
00518 #define APR_DECLARE_DATA __declspec(dllexport)
00519 #else
00520 #define APR_DECLARE(type) __declspec(dllimport) type __stdcall
00521 #define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
00522 #define APR_DECLARE_DATA __declspec(dllimport)
00523 #endif
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534 #define APR_SSIZE_T_FMT "d"
00535
00536
00537 #define APR_SIZE_T_FMT "u"
00538
00539
00540 #define APR_OFF_T_FMT APR_INT64_T_FMT
00541
00542
00543 #define APR_PID_T_FMT "d"
00544
00545
00546 #define APR_INT64_T_FMT "lld"
00547
00548
00549 #define APR_UINT64_T_FMT "llu"
00550
00551
00552 #define APR_UINT64_T_HEX_FMT "llx"
00553
00554
00555
00556
00557 #ifdef DARWIN_10
00558
00559 #undef APR_HAS_LARGE_FILES
00560 #undef APR_SIZEOF_VOIDP
00561 #undef APR_INT64_T_FMT
00562 #undef APR_UINT64_T_FMT
00563 #undef APR_UINT64_T_HEX_FMT
00564
00565 #ifdef __LP64__
00566 #define APR_HAS_LARGE_FILES 0
00567 #define APR_SIZEOF_VOIDP 8
00568 #define APR_INT64_T_FMT "ld"
00569 #define APR_UINT64_T_FMT "lu"
00570 #define APR_UINT64_T_HEX_FMT "lx"
00571 #else
00572 #define APR_HAS_LARGE_FILES 1
00573 #define APR_SIZEOF_VOIDP 4
00574 #define APR_INT64_T_FMT "lld"
00575 #define APR_UINT64_T_FMT "llu"
00576 #define APR_UINT64_T_HEX_FMT "llx"
00577 #endif
00578
00579 #undef APR_IS_BIGENDIAN
00580 #ifdef __BIG_ENDIAN__
00581 #define APR_IS_BIGENDIAN 1
00582 #else
00583 #define APR_IS_BIGENDIAN 0
00584 #endif
00585
00586 #undef APR_OFF_T_FMT
00587 #define APR_OFF_T_FMT "lld"
00588
00589 #endif
00590
00591
00592 #define APR_PROC_MUTEX_IS_GLOBAL 0
00593
00594
00595 #define APR_EOL_STR "\n"
00596
00597 #if APR_HAVE_SYS_WAIT_H
00598 #ifdef WEXITSTATUS
00599 #define apr_wait_t int
00600 #else
00601 #define apr_wait_t union wait
00602 #define WEXITSTATUS(status) (int)((status).w_retcode)
00603 #define WTERMSIG(status) (int)((status).w_termsig)
00604 #endif
00605 #elif defined(__MINGW32__)
00606 typedef int apr_wait_t;
00607 #endif
00608
00609 #if defined(PATH_MAX)
00610 #define APR_PATH_MAX PATH_MAX
00611 #elif defined(_POSIX_PATH_MAX)
00612 #define APR_PATH_MAX _POSIX_PATH_MAX
00613 #else
00614 #error no decision has been made on APR_PATH_MAX for your platform
00615 #endif
00616
00617 #define APR_DSOPATH "LD_LIBRARY_PATH"
00618
00619
00620
00621
00622
00623
00624
00625
00626 #ifdef __MINGW32__
00627 #ifndef __GNUC__
00628 typedef int pid_t;
00629 #endif
00630 typedef int uid_t;
00631 typedef int gid_t;
00632 #endif
00633
00634 #ifdef __cplusplus
00635 }
00636 #endif
00637
00638 #endif