apr.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef APR_H
  17. #define APR_H
  18. /* GENERATED FILE WARNING! DO NOT EDIT apr.h
  19. *
  20. * You must modify apr.hw instead.
  21. *
  22. * And please, make an effort to stub apr.hnw and apr.h.in in the process.
  23. *
  24. * This is the Win32 specific version of apr.h. It is copied from
  25. * apr.hw by the apr.dsp and libapr.dsp projects.
  26. */
  27. /**
  28. * @file apr.h
  29. * @brief APR Platform Definitions
  30. * @remark This is a generated header generated from include/apr.h.in by
  31. * ./configure, or copied from include/apr.hw or include/apr.hnw
  32. * for Win32 or Netware by those build environments, respectively.
  33. */
  34. #if defined(WIN32) || defined(DOXYGEN)
  35. /* Ignore most warnings (back down to /W3) for poorly constructed headers
  36. */
  37. #if defined(_MSC_VER) && _MSC_VER >= 1200
  38. #pragma warning(push, 3)
  39. #endif
  40. /* disable or reduce the frequency of...
  41. * C4057: indirection to slightly different base types
  42. * C4075: slight indirection changes (unsigned short* vs short[])
  43. * C4100: unreferenced formal parameter
  44. * C4127: conditional expression is constant
  45. * C4163: '_rotl64' : not available as an intrinsic function
  46. * C4201: nonstandard extension nameless struct/unions
  47. * C4244: int to char/short - precision loss
  48. * C4514: unreferenced inline function removed
  49. */
  50. #pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
  51. /* Ignore Microsoft's interpretation of secure development
  52. * and the POSIX string handling API
  53. */
  54. #if defined(_MSC_VER) && _MSC_VER >= 1400
  55. #ifndef _CRT_SECURE_NO_DEPRECATE
  56. #define _CRT_SECURE_NO_DEPRECATE
  57. #endif
  58. #pragma warning(disable: 4996)
  59. #endif
  60. /* Has windows.h already been included? If so, our preferences don't matter,
  61. * but we will still need the winsock things no matter what was included.
  62. * If not, include a restricted set of windows headers to our tastes.
  63. */
  64. #ifndef _WINDOWS_
  65. #ifndef WIN32_LEAN_AND_MEAN
  66. #define WIN32_LEAN_AND_MEAN
  67. #endif
  68. #ifndef _WIN32_WINNT
  69. /* Restrict the server to a subset of Windows XP header files by default
  70. */
  71. #define _WIN32_WINNT 0x0501
  72. #endif
  73. #ifndef NOUSER
  74. #define NOUSER
  75. #endif
  76. #ifndef NOMCX
  77. #define NOMCX
  78. #endif
  79. #ifndef NOIME
  80. #define NOIME
  81. #endif
  82. #include <windows.h>
  83. /*
  84. * Add a _very_few_ declarations missing from the restricted set of headers
  85. * (If this list becomes extensive, re-enable the required headers above!)
  86. * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
  87. */
  88. #define SW_HIDE 0
  89. #ifndef _WIN32_WCE
  90. #include <winsock2.h>
  91. #include <ws2tcpip.h>
  92. #include <mswsock.h>
  93. #else
  94. #include <winsock.h>
  95. #endif
  96. #endif /* !_WINDOWS_ */
  97. /**
  98. * @defgroup APR Apache Portability Runtime library
  99. * @{
  100. */
  101. /**
  102. * @defgroup apr_platform Platform Definitions
  103. * @{
  104. * @warning
  105. * <strong><em>The actual values of macros and typedefs on this page<br>
  106. * are platform specific and should NOT be relied upon!</em></strong>
  107. */
  108. #define APR_INLINE __inline
  109. #define APR_HAS_INLINE 1
  110. #if !defined(__GNUC__) && !defined(__attribute__)
  111. #define __attribute__(__x)
  112. #endif
  113. #ifndef _WIN32_WCE
  114. #define APR_HAVE_ARPA_INET_H 0
  115. #define APR_HAVE_CONIO_H 1
  116. #define APR_HAVE_CRYPT_H 0
  117. #define APR_HAVE_CTYPE_H 1
  118. #define APR_HAVE_DIRENT_H 0
  119. #define APR_HAVE_ERRNO_H 1
  120. #define APR_HAVE_FCNTL_H 1
  121. #define APR_HAVE_IO_H 1
  122. #define APR_HAVE_LIMITS_H 1
  123. #define APR_HAVE_NETDB_H 0
  124. #define APR_HAVE_NETINET_IN_H 0
  125. #define APR_HAVE_NETINET_SCTP_H 0
  126. #define APR_HAVE_NETINET_SCTP_UIO_H 0
  127. #define APR_HAVE_NETINET_TCP_H 0
  128. #define APR_HAVE_PTHREAD_H 0
  129. #define APR_HAVE_SEMAPHORE_H 0
  130. #define APR_HAVE_SIGNAL_H 1
  131. #define APR_HAVE_STDARG_H 1
  132. #define APR_HAVE_STDINT_H 0
  133. #define APR_HAVE_STDIO_H 1
  134. #define APR_HAVE_STDLIB_H 1
  135. #define APR_HAVE_STRING_H 1
  136. #define APR_HAVE_STRINGS_H 0
  137. #define APR_HAVE_SYS_IOCTL_H 0
  138. #define APR_HAVE_SYS_SENDFILE_H 0
  139. #define APR_HAVE_SYS_SIGNAL_H 0
  140. #define APR_HAVE_SYS_SOCKET_H 0
  141. #define APR_HAVE_SYS_SOCKIO_H 0
  142. #define APR_HAVE_SYS_SYSLIMITS_H 0
  143. #define APR_HAVE_SYS_TIME_H 0
  144. #define APR_HAVE_SYS_TYPES_H 1
  145. #define APR_HAVE_SYS_UIO_H 0
  146. #define APR_HAVE_SYS_UN_H 0
  147. #define APR_HAVE_SYS_WAIT_H 0
  148. #define APR_HAVE_TIME_H 1
  149. #define APR_HAVE_UNISTD_H 0
  150. #define APR_HAVE_STDDEF_H 1
  151. #define APR_HAVE_PROCESS_H 1
  152. #else
  153. #define APR_HAVE_ARPA_INET_H 0
  154. #define APR_HAVE_CONIO_H 0
  155. #define APR_HAVE_CRYPT_H 0
  156. #define APR_HAVE_CTYPE_H 0
  157. #define APR_HAVE_DIRENT_H 0
  158. #define APR_HAVE_ERRNO_H 0
  159. #define APR_HAVE_FCNTL_H 0
  160. #define APR_HAVE_IO_H 0
  161. #define APR_HAVE_LIMITS_H 0
  162. #define APR_HAVE_NETDB_H 0
  163. #define APR_HAVE_NETINET_IN_H 0
  164. #define APR_HAVE_NETINET_SCTP_H 0
  165. #define APR_HAVE_NETINET_SCTP_UIO_H 0
  166. #define APR_HAVE_NETINET_TCP_H 0
  167. #define APR_HAVE_PTHREAD_H 0
  168. #define APR_HAVE_SEMAPHORE_H 0
  169. #define APR_HAVE_SIGNAL_H 0
  170. #define APR_HAVE_STDARG_H 0
  171. #define APR_HAVE_STDINT_H 0
  172. #define APR_HAVE_STDIO_H 1
  173. #define APR_HAVE_STDLIB_H 1
  174. #define APR_HAVE_STRING_H 1
  175. #define APR_HAVE_STRINGS_H 0
  176. #define APR_HAVE_SYS_IOCTL_H 0
  177. #define APR_HAVE_SYS_SENDFILE_H 0
  178. #define APR_HAVE_SYS_SIGNAL_H 0
  179. #define APR_HAVE_SYS_SOCKET_H 0
  180. #define APR_HAVE_SYS_SOCKIO_H 0
  181. #define APR_HAVE_SYS_SYSLIMITS_H 0
  182. #define APR_HAVE_SYS_TIME_H 0
  183. #define APR_HAVE_SYS_TYPES_H 0
  184. #define APR_HAVE_SYS_UIO_H 0
  185. #define APR_HAVE_SYS_UN_H 0
  186. #define APR_HAVE_SYS_WAIT_H 0
  187. #define APR_HAVE_TIME_H 0
  188. #define APR_HAVE_UNISTD_H 0
  189. #define APR_HAVE_STDDEF_H 0
  190. #define APR_HAVE_PROCESS_H 0
  191. #endif
  192. /** @} */
  193. /** @} */
  194. /* We don't include our conditional headers within the doxyblocks
  195. * or the extern "C" namespace
  196. */
  197. #if APR_HAVE_STDLIB_H
  198. #include <stdlib.h>
  199. #endif
  200. #if APR_HAVE_STDIO_H
  201. #include <stdio.h>
  202. #endif
  203. #if APR_HAVE_SYS_TYPES_H
  204. #include <sys/types.h>
  205. #endif
  206. #if APR_HAVE_STDDEF_H
  207. #include <stddef.h>
  208. #endif
  209. #if APR_HAVE_TIME_H
  210. #include <time.h>
  211. #endif
  212. #if APR_HAVE_PROCESS_H
  213. #include <process.h>
  214. #endif
  215. #ifdef __cplusplus
  216. extern "C" {
  217. #endif
  218. /**
  219. * @addtogroup apr_platform
  220. * @ingroup APR
  221. * @{
  222. */
  223. #define APR_HAVE_SHMEM_MMAP_TMP 0
  224. #define APR_HAVE_SHMEM_MMAP_SHM 0
  225. #define APR_HAVE_SHMEM_MMAP_ZERO 0
  226. #define APR_HAVE_SHMEM_SHMGET_ANON 0
  227. #define APR_HAVE_SHMEM_SHMGET 0
  228. #define APR_HAVE_SHMEM_MMAP_ANON 0
  229. #define APR_HAVE_SHMEM_BEOS 0
  230. #define APR_USE_SHMEM_MMAP_TMP 0
  231. #define APR_USE_SHMEM_MMAP_SHM 0
  232. #define APR_USE_SHMEM_MMAP_ZERO 0
  233. #define APR_USE_SHMEM_SHMGET_ANON 0
  234. #define APR_USE_SHMEM_SHMGET 0
  235. #define APR_USE_SHMEM_MMAP_ANON 0
  236. #define APR_USE_SHMEM_BEOS 0
  237. #define APR_USE_FLOCK_SERIALIZE 0
  238. #define APR_USE_POSIXSEM_SERIALIZE 0
  239. #define APR_USE_SYSVSEM_SERIALIZE 0
  240. #define APR_USE_FCNTL_SERIALIZE 0
  241. #define APR_USE_PROC_PTHREAD_SERIALIZE 0
  242. #define APR_USE_PTHREAD_SERIALIZE 0
  243. #define APR_HAS_FLOCK_SERIALIZE 0
  244. #define APR_HAS_SYSVSEM_SERIALIZE 0
  245. #define APR_HAS_POSIXSEM_SERIALIZE 0
  246. #define APR_HAS_FCNTL_SERIALIZE 0
  247. #define APR_HAS_PROC_PTHREAD_SERIALIZE 0
  248. #define APR_PROCESS_LOCK_IS_GLOBAL 0
  249. #define APR_HAVE_CORKABLE_TCP 0
  250. #define APR_HAVE_GETRLIMIT 0
  251. #define APR_HAVE_ICONV 0
  252. #define APR_HAVE_IN_ADDR 1
  253. #define APR_HAVE_INET_ADDR 1
  254. #define APR_HAVE_INET_NETWORK 0
  255. #define APR_HAVE_IPV6 0
  256. #define APR_HAVE_MEMMOVE 1
  257. #define APR_HAVE_SETRLIMIT 0
  258. #define APR_HAVE_SIGACTION 0
  259. #define APR_HAVE_SIGSUSPEND 0
  260. #define APR_HAVE_SIGWAIT 0
  261. #define APR_HAVE_SA_STORAGE 0
  262. #define APR_HAVE_STRCASECMP 0
  263. #define APR_HAVE_STRDUP 1
  264. #define APR_HAVE_STRNCASECMP 0
  265. #define APR_HAVE_STRSTR 1
  266. #define APR_HAVE_MEMCHR 1
  267. #define APR_HAVE_STRUCT_RLIMIT 0
  268. #define APR_HAVE_UNION_SEMUN 0
  269. #define APR_HAVE_SCTP 0
  270. #define APR_HAVE_IOVEC 0
  271. #ifndef _WIN32_WCE
  272. #define APR_HAVE_STRICMP 1
  273. #define APR_HAVE_STRNICMP 1
  274. #else
  275. #define APR_HAVE_STRICMP 0
  276. #define APR_HAVE_STRNICMP 0
  277. #endif
  278. /* APR Feature Macros */
  279. #define APR_HAS_SHARED_MEMORY 1
  280. #define APR_HAS_THREADS 1
  281. #define APR_HAS_MMAP 1
  282. #define APR_HAS_FORK 0
  283. #define APR_HAS_RANDOM 1
  284. #define APR_HAS_OTHER_CHILD 1
  285. #define APR_HAS_DSO 1
  286. #define APR_HAS_SO_ACCEPTFILTER 0
  287. #define APR_HAS_UNICODE_FS 1
  288. #define APR_HAS_PROC_INVOKED 1
  289. #define APR_HAS_OS_UUID 1
  290. #ifndef _WIN32_WCE
  291. #define APR_HAS_SENDFILE 1
  292. #define APR_HAS_USER 1
  293. #define APR_HAS_LARGE_FILES 1
  294. #define APR_HAS_XTHREAD_FILES 1
  295. #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1
  296. #else
  297. #define APR_HAS_SENDFILE 0
  298. #define APR_HAS_USER 0
  299. #define APR_HAS_LARGE_FILES 0
  300. #define APR_HAS_XTHREAD_FILES 0
  301. #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
  302. #endif
  303. /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  304. * to poll on files/pipes.
  305. */
  306. #define APR_FILES_AS_SOCKETS 0
  307. /* This macro indicates whether or not EBCDIC is the native character set.
  308. */
  309. #define APR_CHARSET_EBCDIC 0
  310. /* If we have a TCP implementation that can be "corked", what flag
  311. * do we use?
  312. */
  313. #define APR_TCP_NOPUSH_FLAG @apr_tcp_nopush_flag@
  314. /* Is the TCP_NODELAY socket option inherited from listening sockets?
  315. */
  316. #define APR_TCP_NODELAY_INHERITED 1
  317. /* Is the O_NONBLOCK flag inherited from listening sockets?
  318. */
  319. #define APR_O_NONBLOCK_INHERITED 1
  320. /* Typedefs that APR needs. */
  321. typedef unsigned char apr_byte_t;
  322. typedef short apr_int16_t;
  323. typedef unsigned short apr_uint16_t;
  324. typedef int apr_int32_t;
  325. typedef unsigned int apr_uint32_t;
  326. typedef __int64 apr_int64_t;
  327. typedef unsigned __int64 apr_uint64_t;
  328. typedef size_t apr_size_t;
  329. #if APR_HAVE_STDDEF_H
  330. typedef ptrdiff_t apr_ssize_t;
  331. #else
  332. typedef int apr_ssize_t;
  333. #endif
  334. #if APR_HAS_LARGE_FILES
  335. typedef __int64 apr_off_t;
  336. #else
  337. typedef int apr_off_t;
  338. #endif
  339. typedef int apr_socklen_t;
  340. typedef apr_uint64_t apr_ino_t;
  341. #ifdef WIN64
  342. #define APR_SIZEOF_VOIDP 8
  343. #else
  344. #define APR_SIZEOF_VOIDP 4
  345. #endif
  346. #if APR_SIZEOF_VOIDP == 8
  347. typedef apr_uint64_t apr_uintptr_t;
  348. #else
  349. typedef apr_uint32_t apr_uintptr_t;
  350. #endif
  351. /* Are we big endian? */
  352. /* XXX: Fatal assumption on Alpha platforms */
  353. #define APR_IS_BIGENDIAN 0
  354. /* Mechanisms to properly type numeric literals */
  355. #ifndef __GNUC__
  356. #define APR_INT64_C(val) (val##i64)
  357. #define APR_UINT64_C(val) (val##Ui64)
  358. #else
  359. #define APR_INT64_C(val) (val##LL)
  360. #define APR_UINT64_C(val) (val##ULL)
  361. #endif
  362. #ifdef INT16_MIN
  363. #define APR_INT16_MIN INT16_MIN
  364. #else
  365. #define APR_INT16_MIN (-0x7fff - 1)
  366. #endif
  367. #ifdef INT16_MAX
  368. #define APR_INT16_MAX INT16_MAX
  369. #else
  370. #define APR_INT16_MAX (0x7fff)
  371. #endif
  372. #ifdef UINT16_MAX
  373. #define APR_UINT16_MAX UINT16_MAX
  374. #else
  375. #define APR_UINT16_MAX (0xffff)
  376. #endif
  377. #ifdef INT32_MIN
  378. #define APR_INT32_MIN INT32_MIN
  379. #else
  380. #define APR_INT32_MIN (-0x7fffffff - 1)
  381. #endif
  382. #ifdef INT32_MAX
  383. #define APR_INT32_MAX INT32_MAX
  384. #else
  385. #define APR_INT32_MAX 0x7fffffff
  386. #endif
  387. #ifdef UINT32_MAX
  388. #define APR_UINT32_MAX UINT32_MAX
  389. #else
  390. #define APR_UINT32_MAX (0xffffffffU)
  391. #endif
  392. #ifdef INT64_MIN
  393. #define APR_INT64_MIN INT64_MIN
  394. #else
  395. #define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
  396. #endif
  397. #ifdef INT64_MAX
  398. #define APR_INT64_MAX INT64_MAX
  399. #else
  400. #define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
  401. #endif
  402. #ifdef UINT64_MAX
  403. #define APR_UINT64_MAX UINT64_MAX
  404. #else
  405. #define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
  406. #endif
  407. #define APR_SIZE_MAX (~((apr_size_t)0))
  408. /* Definitions that APR programs need to work properly. */
  409. /**
  410. * APR public API wrap for C++ compilers.
  411. */
  412. #ifdef __cplusplus
  413. #define APR_BEGIN_DECLS extern "C" {
  414. #define APR_END_DECLS }
  415. #else
  416. #define APR_BEGIN_DECLS
  417. #define APR_END_DECLS
  418. #endif
  419. /**
  420. * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
  421. * so that they follow the platform's calling convention.
  422. * <PRE>
  423. *
  424. * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
  425. *
  426. * </PRE>
  427. */
  428. #define APR_THREAD_FUNC __stdcall
  429. #if defined(DOXYGEN) || !defined(WIN32)
  430. /**
  431. * The public APR functions are declared with APR_DECLARE(), so they may
  432. * use the most appropriate calling convention. Public APR functions with
  433. * variable arguments must use APR_DECLARE_NONSTD().
  434. *
  435. * @remark Both the declaration and implementations must use the same macro.
  436. *
  437. * <PRE>
  438. * APR_DECLARE(rettype) apr_func(args)
  439. * </PRE>
  440. * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  441. * @remark Note that when APR compiles the library itself, it passes the
  442. * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
  443. * to export public symbols from the dynamic library build.\n
  444. * The user must define the APR_DECLARE_STATIC when compiling to target
  445. * the static APR library on some platforms (e.g. Win32.) The public symbols
  446. * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
  447. * By default, compiling an application and including the APR public
  448. * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
  449. * linked to the dynamic library.
  450. */
  451. #define APR_DECLARE(type) type
  452. /**
  453. * The public APR functions using variable arguments are declared with
  454. * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  455. * @see APR_DECLARE @see APR_DECLARE_DATA
  456. * @remark Both the declaration and implementations must use the same macro.
  457. * <PRE>
  458. *
  459. * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
  460. *
  461. * </PRE>
  462. */
  463. #define APR_DECLARE_NONSTD(type) type
  464. /**
  465. * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
  466. * This assures the appropriate indirection is invoked at compile time.
  467. * @see APR_DECLARE @see APR_DECLARE_NONSTD
  468. * @remark Note that the declaration and implementations use different forms,
  469. * but both must include the macro.
  470. *
  471. * <PRE>
  472. *
  473. * extern APR_DECLARE_DATA type apr_variable;\n
  474. * APR_DECLARE_DATA type apr_variable = value;
  475. *
  476. * </PRE>
  477. */
  478. #define APR_DECLARE_DATA
  479. #elif defined(APR_DECLARE_STATIC)
  480. #define APR_DECLARE(type) type __stdcall
  481. #define APR_DECLARE_NONSTD(type) type __cdecl
  482. #define APR_DECLARE_DATA
  483. #elif defined(APR_DECLARE_EXPORT)
  484. #define APR_DECLARE(type) __declspec(dllexport) type __stdcall
  485. #define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
  486. #define APR_DECLARE_DATA __declspec(dllexport)
  487. #else
  488. #define APR_DECLARE(type) __declspec(dllimport) type __stdcall
  489. #define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
  490. #define APR_DECLARE_DATA __declspec(dllimport)
  491. #endif
  492. #ifdef WIN64
  493. #define APR_SSIZE_T_FMT "I64d"
  494. #define APR_SIZE_T_FMT "I64u"
  495. #else
  496. #define APR_SSIZE_T_FMT "d"
  497. #define APR_SIZE_T_FMT "u"
  498. #endif
  499. #if APR_HAS_LARGE_FILES
  500. #define APR_OFF_T_FMT "I64d"
  501. #else
  502. #define APR_OFF_T_FMT "d"
  503. #endif
  504. #define APR_PID_T_FMT "d"
  505. #define APR_INT64_T_FMT "I64d"
  506. #define APR_UINT64_T_FMT "I64u"
  507. #define APR_UINT64_T_HEX_FMT "I64x"
  508. /* No difference between PROC and GLOBAL mutex */
  509. #define APR_PROC_MUTEX_IS_GLOBAL 1
  510. /* Local machine definition for console and log output. */
  511. #define APR_EOL_STR "\r\n"
  512. typedef int apr_wait_t;
  513. #if APR_HAS_UNICODE_FS
  514. /* An arbitrary size that is digestable. True max is a bit less than 32000 */
  515. #define APR_PATH_MAX 8192
  516. #else /* !APR_HAS_UNICODE_FS */
  517. #define APR_PATH_MAX MAX_PATH
  518. #endif
  519. #define APR_DSOPATH "PATH"
  520. /** @} */
  521. /* Definitions that only Win32 programs need to compile properly. */
  522. /* XXX These simply don't belong here, perhaps in apr_portable.h
  523. * based on some APR_HAVE_PID/GID/UID?
  524. */
  525. #ifndef __GNUC__
  526. typedef int pid_t;
  527. #endif
  528. typedef int uid_t;
  529. typedef int gid_t;
  530. /* Win32 .h ommissions we really need */
  531. #define STDIN_FILENO 0
  532. #define STDOUT_FILENO 1
  533. #define STDERR_FILENO 2
  534. #if APR_HAVE_IPV6
  535. /* Appears in later flavors, not the originals. */
  536. #ifndef in_addr6
  537. #define in6_addr in_addr6
  538. #endif
  539. #ifndef WS2TCPIP_INLINE
  540. #define IN6_IS_ADDR_V4MAPPED(a) \
  541. ( (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \
  542. && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
  543. #endif
  544. #endif /* APR_HAS_IPV6 */
  545. #ifdef __cplusplus
  546. }
  547. #endif
  548. /* Done with badly written headers
  549. */
  550. #if defined(_MSC_VER) && _MSC_VER >= 1200
  551. #pragma warning(pop)
  552. #pragma warning(disable: 4996)
  553. #endif
  554. #endif /* WIN32 */
  555. #endif /* APR_H */