apr.hw 17 KB

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