apr.hwc 17 KB

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