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