apr.h.in 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  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 @arpa_ineth@
  66. #define APR_HAVE_CONIO_H @conioh@
  67. #define APR_HAVE_CRYPT_H @crypth@
  68. #define APR_HAVE_CTYPE_H @ctypeh@
  69. #define APR_HAVE_DIRENT_H @direnth@
  70. #define APR_HAVE_ERRNO_H @errnoh@
  71. #define APR_HAVE_FCNTL_H @fcntlh@
  72. #define APR_HAVE_IO_H @ioh@
  73. #define APR_HAVE_LIMITS_H @limitsh@
  74. #define APR_HAVE_NETDB_H @netdbh@
  75. #define APR_HAVE_NETINET_IN_H @netinet_inh@
  76. #define APR_HAVE_NETINET_SCTP_H @netinet_sctph@
  77. #define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
  78. #define APR_HAVE_NETINET_TCP_H @netinet_tcph@
  79. #define APR_HAVE_PROCESS_H @processh@
  80. #define APR_HAVE_PTHREAD_H @pthreadh@
  81. #define APR_HAVE_SEMAPHORE_H @semaphoreh@
  82. #define APR_HAVE_SIGNAL_H @signalh@
  83. #define APR_HAVE_STDARG_H @stdargh@
  84. #define APR_HAVE_STDINT_H @stdint@
  85. #define APR_HAVE_STDIO_H @stdioh@
  86. #define APR_HAVE_STDLIB_H @stdlibh@
  87. #define APR_HAVE_STRING_H @stringh@
  88. #define APR_HAVE_STRINGS_H @stringsh@
  89. #define APR_HAVE_SYS_IOCTL_H @sys_ioctlh@
  90. #define APR_HAVE_SYS_SENDFILE_H @sys_sendfileh@
  91. #define APR_HAVE_SYS_SIGNAL_H @sys_signalh@
  92. #define APR_HAVE_SYS_SOCKET_H @sys_socketh@
  93. #define APR_HAVE_SYS_SOCKIO_H @sys_sockioh@
  94. #define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@
  95. #define APR_HAVE_SYS_TIME_H @sys_timeh@
  96. #define APR_HAVE_SYS_TYPES_H @sys_typesh@
  97. #define APR_HAVE_SYS_UIO_H @sys_uioh@
  98. #define APR_HAVE_SYS_UN_H @sys_unh@
  99. #define APR_HAVE_SYS_WAIT_H @sys_waith@
  100. #define APR_HAVE_TIME_H @timeh@
  101. #define APR_HAVE_UNISTD_H @unistdh@
  102. #define APR_HAVE_WINDOWS_H @windowsh@
  103. #define APR_HAVE_WINSOCK2_H @winsock2h@
  104. /** @} */
  105. /** @} */
  106. /* We don't include our conditional headers within the doxyblocks
  107. * or the extern "C" namespace
  108. */
  109. #if APR_HAVE_WINDOWS_H && defined(WIN32)
  110. /* If windows.h was already included, our preferences don't matter.
  111. * If not, include a restricted set of windows headers to our tastes.
  112. */
  113. #ifndef _WINDOWS_
  114. #ifndef WIN32_LEAN_AND_MEAN
  115. #define WIN32_LEAN_AND_MEAN
  116. #endif
  117. #ifndef _WIN32_WINNT
  118. /* Restrict the server to a subset of Windows XP header files by default
  119. */
  120. #define _WIN32_WINNT 0x0501
  121. #endif
  122. #ifndef NOUSER
  123. #define NOUSER
  124. #endif
  125. #ifndef NOMCX
  126. #define NOMCX
  127. #endif
  128. #ifndef NOIME
  129. #define NOIME
  130. #endif
  131. #include <windows.h>
  132. /*
  133. * Add a _very_few_ declarations missing from the restricted set of headers
  134. * (If this list becomes extensive, re-enable the required headers above!)
  135. * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
  136. */
  137. #define SW_HIDE 0
  138. #ifndef _WIN32_WCE
  139. #include <winsock2.h>
  140. #include <ws2tcpip.h>
  141. #include <mswsock.h>
  142. #else
  143. #include <winsock.h>
  144. #endif
  145. #endif /* ndef _WINDOWS_ */
  146. #endif /* APR_HAVE_WINDOWS_H */
  147. #if APR_HAVE_SYS_TYPES_H
  148. #include <sys/types.h>
  149. #endif
  150. #if APR_HAVE_SYS_SOCKET_H
  151. #include <sys/socket.h>
  152. #endif
  153. #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
  154. /* C99 7.18.4 requires that stdint.h only exposes INT64_C
  155. * and UINT64_C for C++ implementations if this is defined: */
  156. #define __STDC_CONSTANT_MACROS
  157. #endif
  158. #if APR_HAVE_STDINT_H
  159. #include <stdint.h>
  160. #endif
  161. #if APR_HAVE_SYS_WAIT_H
  162. #include <sys/wait.h>
  163. #endif
  164. #ifdef OS2
  165. #define INCL_DOS
  166. #define INCL_DOSERRORS
  167. #include <os2.h>
  168. #endif
  169. /* header files for PATH_MAX, _POSIX_PATH_MAX */
  170. #if APR_HAVE_LIMITS_H
  171. #include <limits.h>
  172. #else
  173. #if APR_HAVE_SYS_SYSLIMITS_H
  174. #include <sys/syslimits.h>
  175. #endif
  176. #endif
  177. #ifdef __cplusplus
  178. extern "C" {
  179. #endif
  180. /**
  181. * @addtogroup apr_platform
  182. * @ingroup APR
  183. * @{
  184. */
  185. #define APR_HAVE_SHMEM_MMAP_TMP @havemmaptmp@
  186. #define APR_HAVE_SHMEM_MMAP_SHM @havemmapshm@
  187. #define APR_HAVE_SHMEM_MMAP_ZERO @havemmapzero@
  188. #define APR_HAVE_SHMEM_SHMGET_ANON @haveshmgetanon@
  189. #define APR_HAVE_SHMEM_SHMGET @haveshmget@
  190. #define APR_HAVE_SHMEM_MMAP_ANON @havemmapanon@
  191. #define APR_HAVE_SHMEM_BEOS @havebeosarea@
  192. #define APR_USE_SHMEM_MMAP_TMP @usemmaptmp@
  193. #define APR_USE_SHMEM_MMAP_SHM @usemmapshm@
  194. #define APR_USE_SHMEM_MMAP_ZERO @usemmapzero@
  195. #define APR_USE_SHMEM_SHMGET_ANON @useshmgetanon@
  196. #define APR_USE_SHMEM_SHMGET @useshmget@
  197. #define APR_USE_SHMEM_MMAP_ANON @usemmapanon@
  198. #define APR_USE_SHMEM_BEOS @usebeosarea@
  199. #define APR_USE_FLOCK_SERIALIZE @flockser@
  200. #define APR_USE_SYSVSEM_SERIALIZE @sysvser@
  201. #define APR_USE_POSIXSEM_SERIALIZE @posixser@
  202. #define APR_USE_FCNTL_SERIALIZE @fcntlser@
  203. #define APR_USE_PROC_PTHREAD_SERIALIZE @procpthreadser@
  204. #define APR_USE_PTHREAD_SERIALIZE @pthreadser@
  205. #define APR_HAS_FLOCK_SERIALIZE @hasflockser@
  206. #define APR_HAS_SYSVSEM_SERIALIZE @hassysvser@
  207. #define APR_HAS_POSIXSEM_SERIALIZE @hasposixser@
  208. #define APR_HAS_FCNTL_SERIALIZE @hasfcntlser@
  209. #define APR_HAS_PROC_PTHREAD_SERIALIZE @hasprocpthreadser@
  210. #define APR_PROCESS_LOCK_IS_GLOBAL @proclockglobal@
  211. #define APR_HAVE_CORKABLE_TCP @have_corkable_tcp@
  212. #define APR_HAVE_GETRLIMIT @have_getrlimit@
  213. #define APR_HAVE_IN_ADDR @have_in_addr@
  214. #define APR_HAVE_INET_ADDR @have_inet_addr@
  215. #define APR_HAVE_INET_NETWORK @have_inet_network@
  216. #define APR_HAVE_IPV6 @have_ipv6@
  217. #define APR_HAVE_MEMMOVE @have_memmove@
  218. #define APR_HAVE_SETRLIMIT @have_setrlimit@
  219. #define APR_HAVE_SIGACTION @have_sigaction@
  220. #define APR_HAVE_SIGSUSPEND @have_sigsuspend@
  221. #define APR_HAVE_SIGWAIT @have_sigwait@
  222. #define APR_HAVE_SA_STORAGE @have_sa_storage@
  223. #define APR_HAVE_STRCASECMP @have_strcasecmp@
  224. #define APR_HAVE_STRDUP @have_strdup@
  225. #define APR_HAVE_STRICMP @have_stricmp@
  226. #define APR_HAVE_STRNCASECMP @have_strncasecmp@
  227. #define APR_HAVE_STRNICMP @have_strnicmp@
  228. #define APR_HAVE_STRSTR @have_strstr@
  229. #define APR_HAVE_MEMCHR @have_memchr@
  230. #define APR_HAVE_STRUCT_RLIMIT @struct_rlimit@
  231. #define APR_HAVE_UNION_SEMUN @have_union_semun@
  232. #define APR_HAVE_SCTP @have_sctp@
  233. #define APR_HAVE_IOVEC @have_iovec@
  234. /* APR Feature Macros */
  235. #define APR_HAS_SHARED_MEMORY @sharedmem@
  236. #define APR_HAS_THREADS @threads@
  237. #define APR_HAS_SENDFILE @sendfile@
  238. #define APR_HAS_MMAP @mmap@
  239. #define APR_HAS_FORK @fork@
  240. #define APR_HAS_RANDOM @rand@
  241. #define APR_HAS_OTHER_CHILD @oc@
  242. #define APR_HAS_DSO @aprdso@
  243. #define APR_HAS_SO_ACCEPTFILTER @acceptfilter@
  244. #define APR_HAS_UNICODE_FS @have_unicode_fs@
  245. #define APR_HAS_PROC_INVOKED @have_proc_invoked@
  246. #define APR_HAS_USER @apr_has_user@
  247. #define APR_HAS_LARGE_FILES @aprlfs@
  248. #define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
  249. #define APR_HAS_OS_UUID @osuuid@
  250. #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
  251. /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  252. * to poll on files/pipes.
  253. */
  254. #define APR_FILES_AS_SOCKETS @file_as_socket@
  255. /* This macro indicates whether or not EBCDIC is the native character set.
  256. */
  257. #define APR_CHARSET_EBCDIC @apr_charset_ebcdic@
  258. /* If we have a TCP implementation that can be "corked", what flag
  259. * do we use?
  260. */
  261. #define APR_TCP_NOPUSH_FLAG @apr_tcp_nopush_flag@
  262. /* Is the TCP_NODELAY socket option inherited from listening sockets?
  263. */
  264. #define APR_TCP_NODELAY_INHERITED @tcp_nodelay_inherited@
  265. /* Is the O_NONBLOCK flag inherited from listening sockets?
  266. */
  267. #define APR_O_NONBLOCK_INHERITED @o_nonblock_inherited@
  268. /* Typedefs that APR needs. */
  269. typedef unsigned char apr_byte_t;
  270. typedef @short_value@ apr_int16_t;
  271. typedef unsigned @short_value@ apr_uint16_t;
  272. typedef @int_value@ apr_int32_t;
  273. typedef unsigned @int_value@ apr_uint32_t;
  274. #define APR_SIZEOF_VOIDP @voidp_size@
  275. /*
  276. * Darwin 10's default compiler (gcc42) builds for both 64 and
  277. * 32 bit architectures unless specifically told not to.
  278. * In those cases, we need to override types depending on how
  279. * we're being built at compile time.
  280. * NOTE: This is an ugly work-around for Darwin's
  281. * concept of universal binaries, a single package
  282. * (executable, lib, etc...) which contains both 32
  283. * and 64 bit versions. The issue is that if APR is
  284. * built universally, if something else is compiled
  285. * against it, some bit sizes will depend on whether
  286. * it is 32 or 64 bit. This is determined by the __LP64__
  287. * flag. Since we need to support both, we have to
  288. * handle OS X unqiuely.
  289. */
  290. #ifdef DARWIN_10
  291. #undef APR_SIZEOF_VOIDP
  292. #undef INT64_C
  293. #undef UINT64_C
  294. #ifdef __LP64__
  295. typedef long apr_int64_t;
  296. typedef unsigned long apr_uint64_t;
  297. #define APR_SIZEOF_VOIDP 8
  298. #define INT64_C(v) (v ## L)
  299. #define UINT64_C(v) (v ## UL)
  300. #else
  301. typedef long long apr_int64_t;
  302. typedef unsigned long long apr_uint64_t;
  303. #define APR_SIZEOF_VOIDP 4
  304. #define INT64_C(v) (v ## LL)
  305. #define UINT64_C(v) (v ## ULL)
  306. #endif
  307. #else
  308. typedef @long_value@ apr_int64_t;
  309. typedef unsigned @long_value@ apr_uint64_t;
  310. #endif
  311. typedef @size_t_value@ apr_size_t;
  312. typedef @ssize_t_value@ apr_ssize_t;
  313. typedef @off_t_value@ apr_off_t;
  314. typedef @socklen_t_value@ apr_socklen_t;
  315. typedef @ino_t_value@ apr_ino_t;
  316. #if APR_SIZEOF_VOIDP == 8
  317. typedef apr_uint64_t apr_uintptr_t;
  318. #else
  319. typedef apr_uint32_t apr_uintptr_t;
  320. #endif
  321. /* Are we big endian? */
  322. #define APR_IS_BIGENDIAN @bigendian@
  323. /* Mechanisms to properly type numeric literals */
  324. @int64_literal@
  325. @uint64_literal@
  326. #ifdef INT16_MIN
  327. #define APR_INT16_MIN INT16_MIN
  328. #else
  329. #define APR_INT16_MIN (-0x7fff - 1)
  330. #endif
  331. #ifdef INT16_MAX
  332. #define APR_INT16_MAX INT16_MAX
  333. #else
  334. #define APR_INT16_MAX (0x7fff)
  335. #endif
  336. #ifdef UINT16_MAX
  337. #define APR_UINT16_MAX UINT16_MAX
  338. #else
  339. #define APR_UINT16_MAX (0xffff)
  340. #endif
  341. #ifdef INT32_MIN
  342. #define APR_INT32_MIN INT32_MIN
  343. #else
  344. #define APR_INT32_MIN (-0x7fffffff - 1)
  345. #endif
  346. #ifdef INT32_MAX
  347. #define APR_INT32_MAX INT32_MAX
  348. #else
  349. #define APR_INT32_MAX 0x7fffffff
  350. #endif
  351. #ifdef UINT32_MAX
  352. #define APR_UINT32_MAX UINT32_MAX
  353. #else
  354. #define APR_UINT32_MAX (0xffffffffU)
  355. #endif
  356. #ifdef INT64_MIN
  357. #define APR_INT64_MIN INT64_MIN
  358. #else
  359. #define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
  360. #endif
  361. #ifdef INT64_MAX
  362. #define APR_INT64_MAX INT64_MAX
  363. #else
  364. #define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
  365. #endif
  366. #ifdef UINT64_MAX
  367. #define APR_UINT64_MAX UINT64_MAX
  368. #else
  369. #define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
  370. #endif
  371. #define APR_SIZE_MAX (~((apr_size_t)0))
  372. /* Definitions that APR programs need to work properly. */
  373. /**
  374. * APR public API wrap for C++ compilers.
  375. */
  376. #ifdef __cplusplus
  377. #define APR_BEGIN_DECLS extern "C" {
  378. #define APR_END_DECLS }
  379. #else
  380. #define APR_BEGIN_DECLS
  381. #define APR_END_DECLS
  382. #endif
  383. /**
  384. * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
  385. * so that they follow the platform's calling convention.
  386. * <PRE>
  387. *
  388. * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
  389. *
  390. * </PRE>
  391. */
  392. #define APR_THREAD_FUNC @apr_thread_func@
  393. #if defined(DOXYGEN) || !defined(WIN32)
  394. /**
  395. * The public APR functions are declared with APR_DECLARE(), so they may
  396. * use the most appropriate calling convention. Public APR functions with
  397. * variable arguments must use APR_DECLARE_NONSTD().
  398. *
  399. * @remark Both the declaration and implementations must use the same macro.
  400. *
  401. * <PRE>
  402. * APR_DECLARE(rettype) apr_func(args)
  403. * </PRE>
  404. * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  405. * @remark Note that when APR compiles the library itself, it passes the
  406. * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
  407. * to export public symbols from the dynamic library build.\n
  408. * The user must define the APR_DECLARE_STATIC when compiling to target
  409. * the static APR library on some platforms (e.g. Win32.) The public symbols
  410. * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
  411. * By default, compiling an application and including the APR public
  412. * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
  413. * linked to the dynamic library.
  414. */
  415. #define APR_DECLARE(type) type
  416. /**
  417. * The public APR functions using variable arguments are declared with
  418. * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  419. * @see APR_DECLARE @see APR_DECLARE_DATA
  420. * @remark Both the declaration and implementations must use the same macro.
  421. * <PRE>
  422. *
  423. * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
  424. *
  425. * </PRE>
  426. */
  427. #define APR_DECLARE_NONSTD(type) type
  428. /**
  429. * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
  430. * This assures the appropriate indirection is invoked at compile time.
  431. * @see APR_DECLARE @see APR_DECLARE_NONSTD
  432. * @remark Note that the declaration and implementations use different forms,
  433. * but both must include the macro.
  434. *
  435. * <PRE>
  436. *
  437. * extern APR_DECLARE_DATA type apr_variable;\n
  438. * APR_DECLARE_DATA type apr_variable = value;
  439. *
  440. * </PRE>
  441. */
  442. #define APR_DECLARE_DATA
  443. #elif defined(APR_DECLARE_STATIC)
  444. #define APR_DECLARE(type) type __stdcall
  445. #define APR_DECLARE_NONSTD(type) type __cdecl
  446. #define APR_DECLARE_DATA
  447. #elif defined(APR_DECLARE_EXPORT)
  448. #define APR_DECLARE(type) __declspec(dllexport) type __stdcall
  449. #define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
  450. #define APR_DECLARE_DATA __declspec(dllexport)
  451. #else
  452. #define APR_DECLARE(type) __declspec(dllimport) type __stdcall
  453. #define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
  454. #define APR_DECLARE_DATA __declspec(dllimport)
  455. #endif
  456. /* Define APR_SSIZE_T_FMT.
  457. * If ssize_t is an integer we define it to be "d",
  458. * if ssize_t is a long int we define it to be "ld",
  459. * if ssize_t is neither we declare an error here.
  460. * I looked for a better way to define this here, but couldn't find one, so
  461. * to find the logic for this definition search for "ssize_t_fmt" in
  462. * configure.in.
  463. */
  464. @ssize_t_fmt@
  465. /* And APR_SIZE_T_FMT */
  466. @size_t_fmt@
  467. /* And APR_OFF_T_FMT */
  468. @off_t_fmt@
  469. /* And APR_PID_T_FMT */
  470. @pid_t_fmt@
  471. /* And APR_INT64_T_FMT */
  472. @int64_t_fmt@
  473. /* And APR_UINT64_T_FMT */
  474. @uint64_t_fmt@
  475. /* And APR_UINT64_T_HEX_FMT */
  476. @uint64_t_hex_fmt@
  477. /*
  478. * Ensure we work with universal binaries on Darwin
  479. */
  480. #ifdef DARWIN_10
  481. #undef APR_HAS_LARGE_FILES
  482. #undef APR_SIZEOF_VOIDP
  483. #undef APR_INT64_T_FMT
  484. #undef APR_UINT64_T_FMT
  485. #undef APR_UINT64_T_HEX_FMT
  486. #ifdef __LP64__
  487. #define APR_HAS_LARGE_FILES 0
  488. #define APR_SIZEOF_VOIDP 8
  489. #define APR_INT64_T_FMT "ld"
  490. #define APR_UINT64_T_FMT "lu"
  491. #define APR_UINT64_T_HEX_FMT "lx"
  492. #else
  493. #define APR_HAS_LARGE_FILES 1
  494. #define APR_SIZEOF_VOIDP 4
  495. #define APR_INT64_T_FMT "lld"
  496. #define APR_UINT64_T_FMT "llu"
  497. #define APR_UINT64_T_HEX_FMT "llx"
  498. #endif
  499. #undef APR_IS_BIGENDIAN
  500. #ifdef __BIG_ENDIAN__
  501. #define APR_IS_BIGENDIAN 1
  502. #else
  503. #define APR_IS_BIGENDIAN 0
  504. #endif
  505. #undef APR_OFF_T_FMT
  506. #define APR_OFF_T_FMT "lld"
  507. #endif /* DARWIN_10 */
  508. /* Does the proc mutex lock threads too */
  509. #define APR_PROC_MUTEX_IS_GLOBAL @proc_mutex_is_global@
  510. /* Local machine definition for console and log output. */
  511. #define APR_EOL_STR "@eolstr@"
  512. #if APR_HAVE_SYS_WAIT_H
  513. #ifdef WEXITSTATUS
  514. #define apr_wait_t int
  515. #else
  516. #define apr_wait_t union wait
  517. #define WEXITSTATUS(status) (int)((status).w_retcode)
  518. #define WTERMSIG(status) (int)((status).w_termsig)
  519. #endif /* !WEXITSTATUS */
  520. #elif defined(__MINGW32__)
  521. typedef int apr_wait_t;
  522. #endif /* HAVE_SYS_WAIT_H */
  523. #if defined(PATH_MAX)
  524. #define APR_PATH_MAX PATH_MAX
  525. #elif defined(_POSIX_PATH_MAX)
  526. #define APR_PATH_MAX _POSIX_PATH_MAX
  527. #else
  528. #error no decision has been made on APR_PATH_MAX for your platform
  529. #endif
  530. #define APR_DSOPATH "@shlibpath_var@"
  531. /** @} */
  532. /* Definitions that only Win32 programs need to compile properly. */
  533. /* XXX These simply don't belong here, perhaps in apr_portable.h
  534. * based on some APR_HAVE_PID/GID/UID?
  535. */
  536. #ifdef __MINGW32__
  537. #ifndef __GNUC__
  538. typedef int pid_t;
  539. #endif
  540. typedef int uid_t;
  541. typedef int gid_t;
  542. #endif
  543. #ifdef __cplusplus
  544. }
  545. #endif
  546. #endif /* APR_H */