GME
13
|
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 00018 #ifndef APR_H 00019 #define APR_H 00020 00021 /* GENERATED FILE WARNING! DO NOT EDIT apr.h 00022 * 00023 * You must modify apr.hw instead. 00024 * 00025 * And please, make an effort to stub apr.hnw and apr.h.in in the process. 00026 * 00027 * This is the Win32 specific version of apr.h. It is copied from 00028 * apr.hw by the apr.dsp and libapr.dsp projects. 00029 */ 00030 00039 /* Make sure we have our platform identifier macro defined we ask for later. 00040 */ 00041 #if defined(_WIN32) && !defined(WIN32) 00042 #define WIN32 1 00043 #endif 00044 00045 #if defined(WIN32) || defined(DOXYGEN) 00046 00047 /* Ignore most warnings (back down to /W3) for poorly constructed headers 00048 */ 00049 #if defined(_MSC_VER) && _MSC_VER >= 1200 00050 #pragma warning(push, 3) 00051 #endif 00052 00053 /* disable or reduce the frequency of... 00054 * C4057: indirection to slightly different base types 00055 * C4075: slight indirection changes (unsigned short* vs short[]) 00056 * C4100: unreferenced formal parameter 00057 * C4127: conditional expression is constant 00058 * C4163: '_rotl64' : not available as an intrinsic function 00059 * C4201: nonstandard extension nameless struct/unions 00060 * C4244: int to char/short - precision loss 00061 * C4514: unreferenced inline function removed 00062 */ 00063 #pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244) 00064 00065 /* Ignore Microsoft's interpretation of secure development 00066 * and the POSIX string handling API 00067 */ 00068 #if defined(_MSC_VER) && _MSC_VER >= 1400 00069 #ifndef _CRT_SECURE_NO_DEPRECATE 00070 #define _CRT_SECURE_NO_DEPRECATE 00071 #endif 00072 #pragma warning(disable: 4996) 00073 #endif 00074 00075 /* Has windows.h already been included? If so, our preferences don't matter, 00076 * but we will still need the winsock things no matter what was included. 00077 * If not, include a restricted set of windows headers to our tastes. 00078 */ 00079 #ifndef _WINDOWS_ 00080 #ifndef WIN32_LEAN_AND_MEAN 00081 #define WIN32_LEAN_AND_MEAN 00082 #endif 00083 #ifndef _WIN32_WINNT 00084 00085 /* Restrict the server to a subset of Windows XP header files by default 00086 */ 00087 #define _WIN32_WINNT 0x0501 00088 #endif 00089 #ifndef NOUSER 00090 #define NOUSER 00091 #endif 00092 #ifndef NOMCX 00093 #define NOMCX 00094 #endif 00095 #ifndef NOIME 00096 #define NOIME 00097 #endif 00098 #include <windows.h> 00099 /* 00100 * Add a _very_few_ declarations missing from the restricted set of headers 00101 * (If this list becomes extensive, re-enable the required headers above!) 00102 * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now 00103 */ 00104 #define SW_HIDE 0 00105 #ifndef _WIN32_WCE 00106 #include <winsock2.h> 00107 #include <ws2tcpip.h> 00108 #include <mswsock.h> 00109 #else 00110 #include <winsock.h> 00111 #endif 00112 #endif /* !_WINDOWS_ */ 00113 00126 #define APR_INLINE __inline 00127 #define APR_HAS_INLINE 1 00128 #if !defined(__GNUC__) && !defined(__attribute__) 00129 #define __attribute__(__x) 00130 #endif 00131 00132 #ifndef _WIN32_WCE 00133 #define APR_HAVE_ARPA_INET_H 0 00134 #define APR_HAVE_CONIO_H 1 00135 #define APR_HAVE_CRYPT_H 0 00136 #define APR_HAVE_CTYPE_H 1 00137 #define APR_HAVE_DIRENT_H 0 00138 #define APR_HAVE_ERRNO_H 1 00139 #define APR_HAVE_FCNTL_H 1 00140 #define APR_HAVE_IO_H 1 00141 #define APR_HAVE_LIMITS_H 1 00142 #define APR_HAVE_NETDB_H 0 00143 #define APR_HAVE_NETINET_IN_H 0 00144 #define APR_HAVE_NETINET_SCTP_H 0 00145 #define APR_HAVE_NETINET_SCTP_UIO_H 0 00146 #define APR_HAVE_NETINET_TCP_H 0 00147 #define APR_HAVE_PTHREAD_H 0 00148 #define APR_HAVE_SEMAPHORE_H 0 00149 #define APR_HAVE_SIGNAL_H 1 00150 #define APR_HAVE_STDARG_H 1 00151 #define APR_HAVE_STDINT_H 0 00152 #define APR_HAVE_STDIO_H 1 00153 #define APR_HAVE_STDLIB_H 1 00154 #define APR_HAVE_STRING_H 1 00155 #define APR_HAVE_STRINGS_H 0 00156 #define APR_HAVE_SYS_IOCTL_H 0 00157 #define APR_HAVE_SYS_SENDFILE_H 0 00158 #define APR_HAVE_SYS_SIGNAL_H 0 00159 #define APR_HAVE_SYS_SOCKET_H 0 00160 #define APR_HAVE_SYS_SOCKIO_H 0 00161 #define APR_HAVE_SYS_SYSLIMITS_H 0 00162 #define APR_HAVE_SYS_TIME_H 0 00163 #define APR_HAVE_SYS_TYPES_H 1 00164 #define APR_HAVE_SYS_UIO_H 0 00165 #define APR_HAVE_SYS_UN_H 0 00166 #define APR_HAVE_SYS_WAIT_H 0 00167 #define APR_HAVE_TIME_H 1 00168 #define APR_HAVE_UNISTD_H 0 00169 #define APR_HAVE_STDDEF_H 1 00170 #define APR_HAVE_PROCESS_H 1 00171 #else 00172 #define APR_HAVE_ARPA_INET_H 0 00173 #define APR_HAVE_CONIO_H 0 00174 #define APR_HAVE_CRYPT_H 0 00175 #define APR_HAVE_CTYPE_H 0 00176 #define APR_HAVE_DIRENT_H 0 00177 #define APR_HAVE_ERRNO_H 0 00178 #define APR_HAVE_FCNTL_H 0 00179 #define APR_HAVE_IO_H 0 00180 #define APR_HAVE_LIMITS_H 0 00181 #define APR_HAVE_NETDB_H 0 00182 #define APR_HAVE_NETINET_IN_H 0 00183 #define APR_HAVE_NETINET_SCTP_H 0 00184 #define APR_HAVE_NETINET_SCTP_UIO_H 0 00185 #define APR_HAVE_NETINET_TCP_H 0 00186 #define APR_HAVE_PTHREAD_H 0 00187 #define APR_HAVE_SEMAPHORE_H 0 00188 #define APR_HAVE_SIGNAL_H 0 00189 #define APR_HAVE_STDARG_H 0 00190 #define APR_HAVE_STDINT_H 0 00191 #define APR_HAVE_STDIO_H 1 00192 #define APR_HAVE_STDLIB_H 1 00193 #define APR_HAVE_STRING_H 1 00194 #define APR_HAVE_STRINGS_H 0 00195 #define APR_HAVE_SYS_IOCTL_H 0 00196 #define APR_HAVE_SYS_SENDFILE_H 0 00197 #define APR_HAVE_SYS_SIGNAL_H 0 00198 #define APR_HAVE_SYS_SOCKET_H 0 00199 #define APR_HAVE_SYS_SOCKIO_H 0 00200 #define APR_HAVE_SYS_SYSLIMITS_H 0 00201 #define APR_HAVE_SYS_TIME_H 0 00202 #define APR_HAVE_SYS_TYPES_H 0 00203 #define APR_HAVE_SYS_UIO_H 0 00204 #define APR_HAVE_SYS_UN_H 0 00205 #define APR_HAVE_SYS_WAIT_H 0 00206 #define APR_HAVE_TIME_H 0 00207 #define APR_HAVE_UNISTD_H 0 00208 #define APR_HAVE_STDDEF_H 0 00209 #define APR_HAVE_PROCESS_H 0 00210 #endif 00211 00215 /* We don't include our conditional headers within the doxyblocks 00216 * or the extern "C" namespace 00217 */ 00218 00219 #if APR_HAVE_STDLIB_H 00220 #include <stdlib.h> 00221 #endif 00222 #if APR_HAVE_STDIO_H 00223 #include <stdio.h> 00224 #endif 00225 #if APR_HAVE_SYS_TYPES_H 00226 #include <sys/types.h> 00227 #endif 00228 #if APR_HAVE_STDDEF_H 00229 #include <stddef.h> 00230 #endif 00231 #if APR_HAVE_TIME_H 00232 #include <time.h> 00233 #endif 00234 #if APR_HAVE_PROCESS_H 00235 #include <process.h> 00236 #endif 00237 00238 #ifdef __cplusplus 00239 extern "C" { 00240 #endif 00241 00248 #define APR_HAVE_SHMEM_MMAP_TMP 0 00249 #define APR_HAVE_SHMEM_MMAP_SHM 0 00250 #define APR_HAVE_SHMEM_MMAP_ZERO 0 00251 #define APR_HAVE_SHMEM_SHMGET_ANON 0 00252 #define APR_HAVE_SHMEM_SHMGET 0 00253 #define APR_HAVE_SHMEM_MMAP_ANON 0 00254 #define APR_HAVE_SHMEM_BEOS 0 00255 00256 #define APR_USE_SHMEM_MMAP_TMP 0 00257 #define APR_USE_SHMEM_MMAP_SHM 0 00258 #define APR_USE_SHMEM_MMAP_ZERO 0 00259 #define APR_USE_SHMEM_SHMGET_ANON 0 00260 #define APR_USE_SHMEM_SHMGET 0 00261 #define APR_USE_SHMEM_MMAP_ANON 0 00262 #define APR_USE_SHMEM_BEOS 0 00263 00264 #define APR_USE_FLOCK_SERIALIZE 0 00265 #define APR_USE_POSIXSEM_SERIALIZE 0 00266 #define APR_USE_SYSVSEM_SERIALIZE 0 00267 #define APR_USE_FCNTL_SERIALIZE 0 00268 #define APR_USE_PROC_PTHREAD_SERIALIZE 0 00269 #define APR_USE_PTHREAD_SERIALIZE 0 00270 00271 #define APR_HAS_FLOCK_SERIALIZE 0 00272 #define APR_HAS_SYSVSEM_SERIALIZE 0 00273 #define APR_HAS_POSIXSEM_SERIALIZE 0 00274 #define APR_HAS_FCNTL_SERIALIZE 0 00275 #define APR_HAS_PROC_PTHREAD_SERIALIZE 0 00276 00277 #define APR_PROCESS_LOCK_IS_GLOBAL 0 00278 00279 #define APR_HAVE_CORKABLE_TCP 0 00280 #define APR_HAVE_GETRLIMIT 0 00281 #define APR_HAVE_ICONV 0 00282 #define APR_HAVE_IN_ADDR 1 00283 #define APR_HAVE_INET_ADDR 1 00284 #define APR_HAVE_INET_NETWORK 0 00285 #define APR_HAVE_IPV6 0 00286 #define APR_HAVE_MEMMOVE 1 00287 #define APR_HAVE_SETRLIMIT 0 00288 #define APR_HAVE_SIGACTION 0 00289 #define APR_HAVE_SIGSUSPEND 0 00290 #define APR_HAVE_SIGWAIT 0 00291 #define APR_HAVE_SA_STORAGE 0 00292 #define APR_HAVE_STRCASECMP 0 00293 #define APR_HAVE_STRDUP 1 00294 #define APR_HAVE_STRNCASECMP 0 00295 #define APR_HAVE_STRSTR 1 00296 #define APR_HAVE_MEMCHR 1 00297 #define APR_HAVE_STRUCT_RLIMIT 0 00298 #define APR_HAVE_UNION_SEMUN 0 00299 #define APR_HAVE_SCTP 0 00300 #define APR_HAVE_IOVEC 0 00301 00302 #ifndef _WIN32_WCE 00303 #define APR_HAVE_STRICMP 1 00304 #define APR_HAVE_STRNICMP 1 00305 #else 00306 #define APR_HAVE_STRICMP 0 00307 #define APR_HAVE_STRNICMP 0 00308 #endif 00309 00310 /* APR Feature Macros */ 00311 #define APR_HAS_SHARED_MEMORY 1 00312 #define APR_HAS_THREADS 1 00313 #define APR_HAS_MMAP 1 00314 #define APR_HAS_FORK 0 00315 #define APR_HAS_RANDOM 1 00316 #define APR_HAS_OTHER_CHILD 1 00317 #define APR_HAS_DSO 1 00318 #define APR_HAS_SO_ACCEPTFILTER 0 00319 #define APR_HAS_UNICODE_FS 1 00320 #define APR_HAS_PROC_INVOKED 1 00321 #define APR_HAS_OS_UUID 1 00322 00323 #ifndef _WIN32_WCE 00324 #define APR_HAS_SENDFILE 1 00325 #define APR_HAS_USER 1 00326 #define APR_HAS_LARGE_FILES 1 00327 #define APR_HAS_XTHREAD_FILES 1 00328 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1 00329 #else 00330 #define APR_HAS_SENDFILE 0 00331 #define APR_HAS_USER 0 00332 #define APR_HAS_LARGE_FILES 0 00333 #define APR_HAS_XTHREAD_FILES 0 00334 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0 00335 #endif 00336 00337 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible 00338 * to poll on files/pipes. 00339 */ 00340 #define APR_FILES_AS_SOCKETS 0 00341 00342 /* This macro indicates whether or not EBCDIC is the native character set. 00343 */ 00344 #define APR_CHARSET_EBCDIC 0 00345 00346 /* If we have a TCP implementation that can be "corked", what flag 00347 * do we use? 00348 */ 00349 #define APR_TCP_NOPUSH_FLAG @apr_tcp_nopush_flag@ 00350 00351 /* Is the TCP_NODELAY socket option inherited from listening sockets? 00352 */ 00353 #define APR_TCP_NODELAY_INHERITED 1 00354 00355 /* Is the O_NONBLOCK flag inherited from listening sockets? 00356 */ 00357 #define APR_O_NONBLOCK_INHERITED 1 00358 00359 /* Typedefs that APR needs. */ 00360 00361 typedef unsigned char apr_byte_t; 00362 00363 typedef short apr_int16_t; 00364 typedef unsigned short apr_uint16_t; 00365 00366 typedef int apr_int32_t; 00367 typedef unsigned int apr_uint32_t; 00368 00369 typedef __int64 apr_int64_t; 00370 typedef unsigned __int64 apr_uint64_t; 00371 00372 typedef size_t apr_size_t; 00373 #if APR_HAVE_STDDEF_H 00374 typedef ptrdiff_t apr_ssize_t; 00375 #else 00376 typedef int apr_ssize_t; 00377 #endif 00378 #if APR_HAS_LARGE_FILES 00379 typedef __int64 apr_off_t; 00380 #else 00381 typedef int apr_off_t; 00382 #endif 00383 typedef int apr_socklen_t; 00384 typedef apr_uint64_t apr_ino_t; 00385 00386 #ifdef _WIN64 00387 #define APR_SIZEOF_VOIDP 8 00388 #else 00389 #define APR_SIZEOF_VOIDP 4 00390 #endif 00391 00392 #if APR_SIZEOF_VOIDP == 8 00393 typedef apr_uint64_t apr_uintptr_t; 00394 #else 00395 typedef apr_uint32_t apr_uintptr_t; 00396 #endif 00397 00398 /* Are we big endian? */ 00399 /* XXX: Fatal assumption on Alpha platforms */ 00400 #define APR_IS_BIGENDIAN 0 00401 00402 /* Mechanisms to properly type numeric literals */ 00403 00404 #ifndef __GNUC__ 00405 #define APR_INT64_C(val) (val##i64) 00406 #define APR_UINT64_C(val) (val##Ui64) 00407 #else 00408 #define APR_INT64_C(val) (val##LL) 00409 #define APR_UINT64_C(val) (val##ULL) 00410 #endif 00411 00412 #ifdef INT16_MIN 00413 #define APR_INT16_MIN INT16_MIN 00414 #else 00415 #define APR_INT16_MIN (-0x7fff - 1) 00416 #endif 00417 00418 #ifdef INT16_MAX 00419 #define APR_INT16_MAX INT16_MAX 00420 #else 00421 #define APR_INT16_MAX (0x7fff) 00422 #endif 00423 00424 #ifdef UINT16_MAX 00425 #define APR_UINT16_MAX UINT16_MAX 00426 #else 00427 #define APR_UINT16_MAX (0xffff) 00428 #endif 00429 00430 #ifdef INT32_MIN 00431 #define APR_INT32_MIN INT32_MIN 00432 #else 00433 #define APR_INT32_MIN (-0x7fffffff - 1) 00434 #endif 00435 00436 #ifdef INT32_MAX 00437 #define APR_INT32_MAX INT32_MAX 00438 #else 00439 #define APR_INT32_MAX 0x7fffffff 00440 #endif 00441 00442 #ifdef UINT32_MAX 00443 #define APR_UINT32_MAX UINT32_MAX 00444 #else 00445 #define APR_UINT32_MAX (0xffffffffU) 00446 #endif 00447 00448 #ifdef INT64_MIN 00449 #define APR_INT64_MIN INT64_MIN 00450 #else 00451 #define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1) 00452 #endif 00453 00454 #ifdef INT64_MAX 00455 #define APR_INT64_MAX INT64_MAX 00456 #else 00457 #define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff) 00458 #endif 00459 00460 #ifdef UINT64_MAX 00461 #define APR_UINT64_MAX UINT64_MAX 00462 #else 00463 #define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff) 00464 #endif 00465 00466 #define APR_SIZE_MAX (~((apr_size_t)0)) 00467 00468 /* Definitions that APR programs need to work properly. */ 00469 00473 #ifdef __cplusplus 00474 #define APR_BEGIN_DECLS extern "C" { 00475 #define APR_END_DECLS } 00476 #else 00477 #define APR_BEGIN_DECLS 00478 #define APR_END_DECLS 00479 #endif 00480 00490 #define APR_THREAD_FUNC __stdcall 00491 00492 00493 #if defined(DOXYGEN) || !defined(WIN32) 00494 00516 #define APR_DECLARE(type) type 00517 00529 #define APR_DECLARE_NONSTD(type) type 00530 00545 #define APR_DECLARE_DATA 00546 00547 #elif defined(APR_DECLARE_STATIC) 00548 #define APR_DECLARE(type) type __stdcall 00549 #define APR_DECLARE_NONSTD(type) type __cdecl 00550 #define APR_DECLARE_DATA 00551 #elif defined(APR_DECLARE_EXPORT) 00552 #define APR_DECLARE(type) __declspec(dllexport) type __stdcall 00553 #define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl 00554 #define APR_DECLARE_DATA __declspec(dllexport) 00555 #else 00556 #define APR_DECLARE(type) __declspec(dllimport) type __stdcall 00557 #define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl 00558 #define APR_DECLARE_DATA __declspec(dllimport) 00559 #endif 00560 00561 #ifdef _WIN64 00562 #define APR_SSIZE_T_FMT "I64d" 00563 #define APR_SIZE_T_FMT "I64u" 00564 #else 00565 #define APR_SSIZE_T_FMT "d" 00566 #define APR_SIZE_T_FMT "u" 00567 #endif 00568 00569 #if APR_HAS_LARGE_FILES 00570 #define APR_OFF_T_FMT "I64d" 00571 #else 00572 #define APR_OFF_T_FMT "d" 00573 #endif 00574 00575 #define APR_PID_T_FMT "d" 00576 00577 #define APR_INT64_T_FMT "I64d" 00578 #define APR_UINT64_T_FMT "I64u" 00579 #define APR_UINT64_T_HEX_FMT "I64x" 00580 00581 /* No difference between PROC and GLOBAL mutex */ 00582 #define APR_PROC_MUTEX_IS_GLOBAL 1 00583 00584 /* Local machine definition for console and log output. */ 00585 #define APR_EOL_STR "\r\n" 00586 00587 typedef int apr_wait_t; 00588 00589 #if APR_HAS_UNICODE_FS 00590 /* An arbitrary size that is digestable. True max is a bit less than 32000 */ 00591 #define APR_PATH_MAX 8192 00592 #else /* !APR_HAS_UNICODE_FS */ 00593 #define APR_PATH_MAX MAX_PATH 00594 #endif 00595 00596 #define APR_DSOPATH "PATH" 00597 00600 /* Definitions that only Win32 programs need to compile properly. */ 00601 00602 /* XXX These simply don't belong here, perhaps in apr_portable.h 00603 * based on some APR_HAVE_PID/GID/UID? 00604 */ 00605 #ifndef __GNUC__ 00606 typedef int pid_t; 00607 #endif 00608 typedef int uid_t; 00609 typedef int gid_t; 00610 00611 /* Win32 .h ommissions we really need */ 00612 #define STDIN_FILENO 0 00613 #define STDOUT_FILENO 1 00614 #define STDERR_FILENO 2 00615 00616 #if APR_HAVE_IPV6 00617 00618 /* Appears in later flavors, not the originals. */ 00619 #ifndef in_addr6 00620 #define in6_addr in_addr6 00621 #endif 00622 00623 #ifndef WS2TCPIP_INLINE 00624 #define IN6_IS_ADDR_V4MAPPED(a) \ 00625 ( (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \ 00626 && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff))) 00627 #endif 00628 00629 #endif /* APR_HAS_IPV6 */ 00630 00631 #ifdef __cplusplus 00632 } 00633 #endif 00634 00635 /* Done with badly written headers 00636 */ 00637 #if defined(_MSC_VER) && _MSC_VER >= 1200 00638 #pragma warning(pop) 00639 #pragma warning(disable: 4996) 00640 #endif 00641 00642 #endif /* WIN32 */ 00643 00644 #endif /* APR_H */