apr.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  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.h.in instead.
  21. *
  22. * And please, make an effort to stub apr.hw and apr.hnw in the process.
  23. */
  24. /**
  25. * @file apr.h
  26. * @brief APR Platform Definitions
  27. * @remark This is a generated header generated from include/apr.h.in by
  28. * ./configure, or copied from include/apr.hw or include/apr.hnw
  29. * for Win32 or Netware by those build environments, respectively.
  30. */
  31. /**
  32. * @defgroup APR Apache Portability Runtime library
  33. * @{
  34. */
  35. /**
  36. * @defgroup apr_platform Platform Definitions
  37. * @{
  38. * @warning
  39. * <strong><em>The actual values of macros and typedefs on this page<br>
  40. * are platform specific and should NOT be relied upon!</em></strong>
  41. */
  42. /* So that we can use inline on some critical functions, and use
  43. * GNUC attributes (such as to get -Wall warnings for printf-like
  44. * functions). Only do this in gcc 2.7 or later ... it may work
  45. * on earlier stuff, but why chance it.
  46. *
  47. * We've since discovered that the gcc shipped with NeXT systems
  48. * as "cc" is completely broken. It claims to be __GNUC__ and so
  49. * on, but it doesn't implement half of the things that __GNUC__
  50. * means. In particular it's missing inline and the __attribute__
  51. * stuff. So we hack around it. PR#1613. -djg
  52. */
  53. #if !defined(__GNUC__) || __GNUC__ < 2 || \
  54. (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
  55. defined(NEXT)
  56. #ifndef __attribute__
  57. #define __attribute__(__x)
  58. #endif
  59. #define APR_INLINE
  60. #define APR_HAS_INLINE 0
  61. #else
  62. #define APR_INLINE __inline__
  63. #define APR_HAS_INLINE 1
  64. #endif
  65. #define APR_HAVE_ARPA_INET_H 1
  66. #define APR_HAVE_CONIO_H 0
  67. #define APR_HAVE_CRYPT_H 0
  68. #define APR_HAVE_CTYPE_H 1
  69. #define APR_HAVE_DIRENT_H 1
  70. #define APR_HAVE_ERRNO_H 1
  71. #define APR_HAVE_FCNTL_H 1
  72. #define APR_HAVE_IO_H 0
  73. #define APR_HAVE_LIMITS_H 1
  74. #define APR_HAVE_NETDB_H 1
  75. #define APR_HAVE_NETINET_IN_H 1
  76. #define APR_HAVE_NETINET_SCTP_H 0
  77. #define APR_HAVE_NETINET_SCTP_UIO_H 0
  78. #define APR_HAVE_NETINET_TCP_H 1
  79. #define APR_HAVE_PROCESS_H 0
  80. #define APR_HAVE_PTHREAD_H 1
  81. #define APR_HAVE_SEMAPHORE_H 1
  82. #define APR_HAVE_SIGNAL_H 1
  83. #define APR_HAVE_STDARG_H 1
  84. #define APR_HAVE_STDINT_H 1
  85. #define APR_HAVE_STDIO_H 1
  86. #define APR_HAVE_STDLIB_H 1
  87. #define APR_HAVE_STRING_H 1
  88. #define APR_HAVE_STRINGS_H 1
  89. #define APR_HAVE_INTTYPES_H 1
  90. #define APR_HAVE_SYS_IOCTL_H 1
  91. #define APR_HAVE_SYS_SENDFILE_H 0
  92. #define APR_HAVE_SYS_SIGNAL_H 1
  93. #define APR_HAVE_SYS_SOCKET_H 1
  94. #define APR_HAVE_SYS_SOCKIO_H 1
  95. #define APR_HAVE_SYS_SYSLIMITS_H 1
  96. #define APR_HAVE_SYS_TIME_H 1
  97. #define APR_HAVE_SYS_TYPES_H 1
  98. #define APR_HAVE_SYS_UIO_H 1
  99. #define APR_HAVE_SYS_UN_H 1
  100. #define APR_HAVE_SYS_WAIT_H 1
  101. #define APR_HAVE_TIME_H 1
  102. #define APR_HAVE_UNISTD_H 1
  103. #define APR_HAVE_WINDOWS_H 0
  104. #define APR_HAVE_WINSOCK2_H 0
  105. /** @} */
  106. /** @} */
  107. /* We don't include our conditional headers within the doxyblocks
  108. * or the extern "C" namespace
  109. */
  110. #if APR_HAVE_WINDOWS_H && defined(WIN32)
  111. /* If windows.h was already included, our preferences don't matter.
  112. * If not, include a restricted set of windows headers to our tastes.
  113. */
  114. #ifndef _WINDOWS_
  115. #ifndef WIN32_LEAN_AND_MEAN
  116. #define WIN32_LEAN_AND_MEAN
  117. #endif
  118. #ifndef _WIN32_WINNT
  119. /* Restrict the server to a subset of Windows XP header files by default
  120. */
  121. #define _WIN32_WINNT 0x0501
  122. #endif
  123. #ifndef NOUSER
  124. #define NOUSER
  125. #endif
  126. #ifndef NOMCX
  127. #define NOMCX
  128. #endif
  129. #ifndef NOIME
  130. #define NOIME
  131. #endif
  132. #include <windows.h>
  133. /*
  134. * Add a _very_few_ declarations missing from the restricted set of headers
  135. * (If this list becomes extensive, re-enable the required headers above!)
  136. * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
  137. */
  138. #define SW_HIDE 0
  139. #ifndef _WIN32_WCE
  140. #include <winsock2.h>
  141. #include <ws2tcpip.h>
  142. #include <mswsock.h>
  143. #else
  144. #include <winsock.h>
  145. #endif
  146. #endif /* ndef _WINDOWS_ */
  147. #endif /* APR_HAVE_WINDOWS_H */
  148. #if APR_HAVE_SYS_TYPES_H
  149. #include <sys/types.h>
  150. #endif
  151. #if APR_HAVE_SYS_SOCKET_H
  152. #include <sys/socket.h>
  153. #endif
  154. #if APR_HAVE_STDINT_H
  155. #ifdef __cplusplus
  156. /* C99 7.18.4 requires that stdint.h only exposes INT64_C
  157. * and UINT64_C for C++ implementations if this is defined: */
  158. #ifndef __STDC_CONSTANT_MACROS
  159. #define __STDC_CONSTANT_MACROS
  160. #endif
  161. /* C++ needs this too for PRI*NN formats: */
  162. #ifndef __STDC_FORMAT_MACROS
  163. #define __STDC_FORMAT_MACROS
  164. #endif
  165. #endif /* __cplusplus */
  166. #include <stdint.h>
  167. #endif
  168. #if APR_HAVE_INTTYPES_H
  169. #include <inttypes.h>
  170. #endif
  171. #if APR_HAVE_SYS_WAIT_H
  172. #include <sys/wait.h>
  173. #endif
  174. #ifdef OS2
  175. #define INCL_DOS
  176. #define INCL_DOSERRORS
  177. #include <os2.h>
  178. #endif
  179. /* header files for PATH_MAX, _POSIX_PATH_MAX */
  180. #if APR_HAVE_LIMITS_H
  181. #include <limits.h>
  182. #else
  183. #if APR_HAVE_SYS_SYSLIMITS_H
  184. #include <sys/syslimits.h>
  185. #endif
  186. #endif
  187. /* __APPLE__ is now the official pre-defined macro for macOS */
  188. #ifdef __APPLE__
  189. #undef DARWIN
  190. #undef DARWIN_10
  191. #define DARWIN
  192. #define DARWIN_10
  193. #endif /* __APPLE__ */
  194. #ifdef __cplusplus
  195. extern "C" {
  196. #endif
  197. /**
  198. * @addtogroup apr_platform
  199. * @ingroup APR
  200. * @{
  201. */
  202. #define APR_HAVE_SHMEM_MMAP_TMP 1
  203. #define APR_HAVE_SHMEM_MMAP_SHM 1
  204. #define APR_HAVE_SHMEM_MMAP_ZERO 0
  205. #define APR_HAVE_SHMEM_SHMGET_ANON 1
  206. #define APR_HAVE_SHMEM_SHMGET 1
  207. #define APR_HAVE_SHMEM_MMAP_ANON 1
  208. #define APR_HAVE_SHMEM_BEOS 0
  209. #define APR_USE_SHMEM_MMAP_TMP 0
  210. #define APR_USE_SHMEM_MMAP_SHM 1
  211. #define APR_USE_SHMEM_MMAP_ZERO 0
  212. #define APR_USE_SHMEM_SHMGET_ANON 0
  213. #define APR_USE_SHMEM_SHMGET 0
  214. #define APR_USE_SHMEM_MMAP_ANON 1
  215. #define APR_USE_SHMEM_BEOS 0
  216. #define APR_USE_FLOCK_SERIALIZE 0
  217. #define APR_USE_SYSVSEM_SERIALIZE 1
  218. #define APR_USE_POSIXSEM_SERIALIZE 0
  219. #define APR_USE_FCNTL_SERIALIZE 0
  220. #define APR_USE_PROC_PTHREAD_SERIALIZE 0
  221. #define APR_USE_PTHREAD_SERIALIZE 1
  222. #define APR_HAS_FLOCK_SERIALIZE 1
  223. #define APR_HAS_SYSVSEM_SERIALIZE 1
  224. #define APR_HAS_POSIXSEM_SERIALIZE 1
  225. #define APR_HAS_FCNTL_SERIALIZE 1
  226. #define APR_HAS_PROC_PTHREAD_SERIALIZE 0
  227. #define APR_PROCESS_LOCK_IS_GLOBAL 0
  228. #define APR_HAVE_CORKABLE_TCP 1
  229. #define APR_HAVE_GETRLIMIT 1
  230. #define APR_HAVE_IN_ADDR 1
  231. #define APR_HAVE_INET_ADDR 1
  232. #define APR_HAVE_INET_NETWORK 1
  233. #define APR_HAVE_IPV6 1
  234. #define APR_HAVE_SOCKADDR_UN 1
  235. #define APR_HAVE_MEMMOVE 1
  236. #define APR_HAVE_SETRLIMIT 1
  237. #define APR_HAVE_SIGACTION 1
  238. #define APR_HAVE_SIGSUSPEND 1
  239. #define APR_HAVE_SIGWAIT 1
  240. #define APR_HAVE_SA_STORAGE 1
  241. #define APR_HAVE_STRCASECMP 1
  242. #define APR_HAVE_STRDUP 1
  243. #define APR_HAVE_STRICMP 0
  244. #define APR_HAVE_STRNCASECMP 1
  245. #define APR_HAVE_STRNICMP 0
  246. #define APR_HAVE_STRSTR 1
  247. #define APR_HAVE_MEMCHR 1
  248. #define APR_HAVE_STRUCT_RLIMIT 1
  249. #define APR_HAVE_UNION_SEMUN 1
  250. #define APR_HAVE_SCTP 0
  251. #define APR_HAVE_IOVEC 1
  252. /* APR Feature Macros */
  253. #define APR_HAS_SHARED_MEMORY 1
  254. #define APR_HAS_THREADS 1
  255. #define APR_HAS_SENDFILE 1
  256. #define APR_HAS_MMAP 1
  257. #define APR_HAS_FORK 1
  258. #define APR_HAS_RANDOM 1
  259. #define APR_HAS_OTHER_CHILD 1
  260. #define APR_HAS_DSO 1
  261. #define APR_HAS_SO_ACCEPTFILTER 0
  262. #define APR_HAS_UNICODE_FS 0
  263. #define APR_HAS_PROC_INVOKED 0
  264. #define APR_HAS_USER 1
  265. #define APR_HAS_LARGE_FILES 0
  266. #define APR_HAS_XTHREAD_FILES 0
  267. #define APR_HAS_OS_UUID 1
  268. #define APR_HAS_TIMEDLOCKS 1
  269. #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
  270. /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  271. * to poll on files/pipes.
  272. */
  273. #define APR_FILES_AS_SOCKETS 1
  274. /* This macro indicates whether or not EBCDIC is the native character set.
  275. */
  276. #define APR_CHARSET_EBCDIC 0
  277. /* If we have a TCP implementation that can be "corked", what flag
  278. * do we use?
  279. */
  280. #define APR_TCP_NOPUSH_FLAG TCP_NOPUSH
  281. /* Is the TCP_NODELAY socket option inherited from listening sockets?
  282. */
  283. #define APR_TCP_NODELAY_INHERITED 1
  284. /* Is the O_NONBLOCK flag inherited from listening sockets?
  285. */
  286. #define APR_O_NONBLOCK_INHERITED 1
  287. /* Typedefs that APR needs. */
  288. typedef unsigned char apr_byte_t;
  289. typedef short apr_int16_t;
  290. typedef unsigned short apr_uint16_t;
  291. typedef int apr_int32_t;
  292. typedef unsigned int apr_uint32_t;
  293. #define APR_SIZEOF_VOIDP 8
  294. /*
  295. * Darwin 10's default compiler (gcc42) builds for both 64 and
  296. * 32 bit architectures unless specifically told not to.
  297. * In those cases, we need to override types depending on how
  298. * we're being built at compile time.
  299. * NOTE: This is an ugly work-around for Darwin's
  300. * concept of universal binaries, a single package
  301. * (executable, lib, etc...) which contains both 32
  302. * and 64 bit versions. The issue is that if APR is
  303. * built universally, if something else is compiled
  304. * against it, some bit sizes will depend on whether
  305. * it is 32 or 64 bit. This is determined by the __LP64__
  306. * flag. Since we need to support both, we have to
  307. * handle OS X unqiuely.
  308. */
  309. #ifdef DARWIN_10
  310. #undef APR_SIZEOF_VOIDP
  311. #undef APR_INT64_C
  312. #undef APR_UINT64_C
  313. #ifdef __LP64__
  314. typedef long apr_int64_t;
  315. typedef unsigned long apr_uint64_t;
  316. #define APR_SIZEOF_VOIDP 8
  317. #define APR_INT64_C(v) (v ## L)
  318. #define APR_UINT64_C(v) (v ## UL)
  319. #else
  320. typedef long long apr_int64_t;
  321. typedef unsigned long long apr_uint64_t;
  322. #define APR_SIZEOF_VOIDP 4
  323. #define APR_INT64_C(v) (v ## LL)
  324. #define APR_UINT64_C(v) (v ## ULL)
  325. #endif
  326. #else
  327. typedef int64_t apr_int64_t;
  328. typedef uint64_t apr_uint64_t;
  329. /* Mechanisms to properly type numeric literals */
  330. #define APR_INT64_C(val) INT64_C(val)
  331. #define APR_UINT64_C(val) UINT64_C(val)
  332. #endif
  333. typedef size_t apr_size_t;
  334. typedef ssize_t apr_ssize_t;
  335. typedef off_t apr_off_t;
  336. typedef socklen_t apr_socklen_t;
  337. typedef ino_t apr_ino_t;
  338. #if APR_SIZEOF_VOIDP == 8
  339. typedef apr_uint64_t apr_uintptr_t;
  340. #else
  341. typedef apr_uint32_t apr_uintptr_t;
  342. #endif
  343. /* Are we big endian? */
  344. #define APR_IS_BIGENDIAN 0
  345. #ifdef INT16_MIN
  346. #define APR_INT16_MIN INT16_MIN
  347. #else
  348. #define APR_INT16_MIN (-0x7fff - 1)
  349. #endif
  350. #ifdef INT16_MAX
  351. #define APR_INT16_MAX INT16_MAX
  352. #else
  353. #define APR_INT16_MAX (0x7fff)
  354. #endif
  355. #ifdef UINT16_MAX
  356. #define APR_UINT16_MAX UINT16_MAX
  357. #else
  358. #define APR_UINT16_MAX (0xffff)
  359. #endif
  360. #ifdef INT32_MIN
  361. #define APR_INT32_MIN INT32_MIN
  362. #else
  363. #define APR_INT32_MIN (-0x7fffffff - 1)
  364. #endif
  365. #ifdef INT32_MAX
  366. #define APR_INT32_MAX INT32_MAX
  367. #else
  368. #define APR_INT32_MAX 0x7fffffff
  369. #endif
  370. #ifdef UINT32_MAX
  371. #define APR_UINT32_MAX UINT32_MAX
  372. #else
  373. #define APR_UINT32_MAX (0xffffffffU)
  374. #endif
  375. #ifdef INT64_MIN
  376. #define APR_INT64_MIN INT64_MIN
  377. #else
  378. #define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
  379. #endif
  380. #ifdef INT64_MAX
  381. #define APR_INT64_MAX INT64_MAX
  382. #else
  383. #define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
  384. #endif
  385. #ifdef UINT64_MAX
  386. #define APR_UINT64_MAX UINT64_MAX
  387. #else
  388. #define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
  389. #endif
  390. #define APR_SIZE_MAX (~((apr_size_t)0))
  391. /* Definitions that APR programs need to work properly. */
  392. /**
  393. * APR public API wrap for C++ compilers.
  394. */
  395. #ifdef __cplusplus
  396. #define APR_BEGIN_DECLS extern "C" {
  397. #define APR_END_DECLS }
  398. #else
  399. #define APR_BEGIN_DECLS
  400. #define APR_END_DECLS
  401. #endif
  402. /**
  403. * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
  404. * so that they follow the platform's calling convention.
  405. * <PRE>
  406. *
  407. * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
  408. *
  409. * </PRE>
  410. */
  411. #define APR_THREAD_FUNC
  412. #if defined(DOXYGEN) || !defined(WIN32)
  413. /**
  414. * The public APR functions are declared with APR_DECLARE(), so they may
  415. * use the most appropriate calling convention. Public APR functions with
  416. * variable arguments must use APR_DECLARE_NONSTD().
  417. *
  418. * @remark Both the declaration and implementations must use the same macro.
  419. *
  420. * <PRE>
  421. * APR_DECLARE(rettype) apr_func(args)
  422. * </PRE>
  423. * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  424. * @remark Note that when APR compiles the library itself, it passes the
  425. * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
  426. * to export public symbols from the dynamic library build.\n
  427. * The user must define the APR_DECLARE_STATIC when compiling to target
  428. * the static APR library on some platforms (e.g. Win32.) The public symbols
  429. * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
  430. * By default, compiling an application and including the APR public
  431. * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
  432. * linked to the dynamic library.
  433. */
  434. #define APR_DECLARE(type) type
  435. /**
  436. * The public APR functions using variable arguments are declared with
  437. * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  438. * @see APR_DECLARE @see APR_DECLARE_DATA
  439. * @remark Both the declaration and implementations must use the same macro.
  440. * <PRE>
  441. *
  442. * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
  443. *
  444. * </PRE>
  445. */
  446. #define APR_DECLARE_NONSTD(type) type
  447. /**
  448. * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
  449. * This assures the appropriate indirection is invoked at compile time.
  450. * @see APR_DECLARE @see APR_DECLARE_NONSTD
  451. * @remark Note that the declaration and implementations use different forms,
  452. * but both must include the macro.
  453. *
  454. * <PRE>
  455. *
  456. * extern APR_DECLARE_DATA type apr_variable;\n
  457. * APR_DECLARE_DATA type apr_variable = value;
  458. *
  459. * </PRE>
  460. */
  461. #define APR_DECLARE_DATA
  462. #elif defined(APR_DECLARE_STATIC)
  463. #define APR_DECLARE(type) type __stdcall
  464. #define APR_DECLARE_NONSTD(type) type __cdecl
  465. #define APR_DECLARE_DATA
  466. #elif defined(APR_DECLARE_EXPORT)
  467. #define APR_DECLARE(type) __declspec(dllexport) type __stdcall
  468. #define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
  469. #define APR_DECLARE_DATA __declspec(dllexport)
  470. #else
  471. #define APR_DECLARE(type) __declspec(dllimport) type __stdcall
  472. #define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
  473. #define APR_DECLARE_DATA __declspec(dllimport)
  474. #endif
  475. /* Define APR_SSIZE_T_FMT.
  476. * If ssize_t is an integer we define it to be "d",
  477. * if ssize_t is a long int we define it to be "ld",
  478. * if ssize_t is neither we declare an error here.
  479. * I looked for a better way to define this here, but couldn't find one, so
  480. * to find the logic for this definition search for "ssize_t_fmt" in
  481. * configure.in.
  482. */
  483. #define APR_SSIZE_T_FMT "ld"
  484. /* And APR_SIZE_T_FMT */
  485. #define APR_SIZE_T_FMT "lu"
  486. /* And APR_OFF_T_FMT */
  487. #define APR_OFF_T_FMT "lld"
  488. /* And APR_PID_T_FMT */
  489. #define APR_PID_T_FMT "d"
  490. /* And APR_INT64_T_FMT */
  491. #define APR_INT64_T_FMT PRId64
  492. /* And APR_UINT64_T_FMT */
  493. #define APR_UINT64_T_FMT PRIu64
  494. /* And APR_UINT64_T_HEX_FMT */
  495. #define APR_UINT64_T_HEX_FMT PRIx64
  496. /*
  497. * Ensure we work with universal binaries on Darwin
  498. */
  499. #ifdef DARWIN_10
  500. #undef APR_HAS_LARGE_FILES
  501. #undef APR_SIZEOF_VOIDP
  502. #undef APR_INT64_T_FMT
  503. #undef APR_UINT64_T_FMT
  504. #undef APR_UINT64_T_HEX_FMT
  505. #ifdef __LP64__
  506. #define APR_HAS_LARGE_FILES 0
  507. #define APR_SIZEOF_VOIDP 8
  508. #define APR_INT64_T_FMT "ld"
  509. #define APR_UINT64_T_FMT "lu"
  510. #define APR_UINT64_T_HEX_FMT "lx"
  511. #else
  512. #define APR_HAS_LARGE_FILES 1
  513. #define APR_SIZEOF_VOIDP 4
  514. #define APR_INT64_T_FMT "lld"
  515. #define APR_UINT64_T_FMT "llu"
  516. #define APR_UINT64_T_HEX_FMT "llx"
  517. #endif
  518. #undef APR_IS_BIGENDIAN
  519. #ifdef __BIG_ENDIAN__
  520. #define APR_IS_BIGENDIAN 1
  521. #else
  522. #define APR_IS_BIGENDIAN 0
  523. #endif
  524. #undef APR_OFF_T_FMT
  525. #define APR_OFF_T_FMT "lld"
  526. #endif /* DARWIN_10 */
  527. /* Does the proc mutex lock threads too */
  528. #define APR_PROC_MUTEX_IS_GLOBAL 0
  529. /* Local machine definition for console and log output. */
  530. #define APR_EOL_STR "\n"
  531. #if APR_HAVE_SYS_WAIT_H
  532. #ifdef WEXITSTATUS
  533. #define apr_wait_t int
  534. #else
  535. #define apr_wait_t union wait
  536. #define WEXITSTATUS(status) (int)((status).w_retcode)
  537. #define WTERMSIG(status) (int)((status).w_termsig)
  538. #endif /* !WEXITSTATUS */
  539. #elif defined(__MINGW32__)
  540. typedef int apr_wait_t;
  541. #endif /* HAVE_SYS_WAIT_H */
  542. #if defined(PATH_MAX)
  543. #define APR_PATH_MAX PATH_MAX
  544. #elif defined(_POSIX_PATH_MAX)
  545. #define APR_PATH_MAX _POSIX_PATH_MAX
  546. #else
  547. #error no decision has been made on APR_PATH_MAX for your platform
  548. #endif
  549. #define APR_DSOPATH "DYLD_LIBRARY_PATH"
  550. /** @} */
  551. /* Definitions that only Win32 programs need to compile properly. */
  552. /* XXX These simply don't belong here, perhaps in apr_portable.h
  553. * based on some APR_HAVE_PID/GID/UID?
  554. */
  555. #ifdef __MINGW32__
  556. #ifndef __GNUC__
  557. typedef int pid_t;
  558. #endif
  559. typedef int uid_t;
  560. typedef int gid_t;
  561. #endif
  562. #ifdef __cplusplus
  563. }
  564. #endif
  565. #endif /* APR_H */