fspr.h.in 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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 fspr_platform Platform Definitions
  37. * @{
  38. */
  39. /* So that we can use inline on some critical functions, and use
  40. * GNUC attributes (such as to get -Wall warnings for printf-like
  41. * functions). Only do this in gcc 2.7 or later ... it may work
  42. * on earlier stuff, but why chance it.
  43. *
  44. * We've since discovered that the gcc shipped with NeXT systems
  45. * as "cc" is completely broken. It claims to be __GNUC__ and so
  46. * on, but it doesn't implement half of the things that __GNUC__
  47. * means. In particular it's missing inline and the __attribute__
  48. * stuff. So we hack around it. PR#1613. -djg
  49. */
  50. #if !defined(__GNUC__) || __GNUC__ < 2 || \
  51. (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
  52. defined(NEXT)
  53. #ifndef __attribute__
  54. #define __attribute__(__x)
  55. #endif
  56. #define APR_INLINE
  57. #define APR_HAS_INLINE 0
  58. #else
  59. #define APR_INLINE __inline__
  60. #define APR_HAS_INLINE 1
  61. #endif
  62. #define APR_HAVE_ARPA_INET_H @arpa_ineth@
  63. #define APR_HAVE_CONIO_H @conioh@
  64. #define APR_HAVE_CRYPT_H @crypth@
  65. #define APR_HAVE_CTYPE_H @ctypeh@
  66. #define APR_HAVE_DIRENT_H @direnth@
  67. #define APR_HAVE_ERRNO_H @errnoh@
  68. #define APR_HAVE_FCNTL_H @fcntlh@
  69. #define APR_HAVE_IO_H @ioh@
  70. #define APR_HAVE_LIMITS_H @limitsh@
  71. #define APR_HAVE_NETDB_H @netdbh@
  72. #define APR_HAVE_NETINET_IN_H @netinet_inh@
  73. #define APR_HAVE_NETINET_SCTP_H @netinet_sctph@
  74. #define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
  75. #define APR_HAVE_NETINET_TCP_H @netinet_tcph@
  76. #define APR_HAVE_PTHREAD_H @pthreadh@
  77. #define APR_HAVE_SEMAPHORE_H @semaphoreh@
  78. #define APR_HAVE_SIGNAL_H @signalh@
  79. #define APR_HAVE_STDARG_H @stdargh@
  80. #define APR_HAVE_STDINT_H @stdint@
  81. #define APR_HAVE_STDIO_H @stdioh@
  82. #define APR_HAVE_STDLIB_H @stdlibh@
  83. #define APR_HAVE_STRING_H @stringh@
  84. #define APR_HAVE_STRINGS_H @stringsh@
  85. #define APR_HAVE_SYS_IOCTL_H @sys_ioctlh@
  86. #define APR_HAVE_SYS_SENDFILE_H @sys_sendfileh@
  87. #define APR_HAVE_SYS_SIGNAL_H @sys_signalh@
  88. #define APR_HAVE_SYS_SOCKET_H @sys_socketh@
  89. #define APR_HAVE_SYS_SOCKIO_H @sys_sockioh@
  90. #define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@
  91. #define APR_HAVE_SYS_TIME_H @sys_timeh@
  92. #define APR_HAVE_SYS_TYPES_H @sys_typesh@
  93. #define APR_HAVE_SYS_UIO_H @sys_uioh@
  94. #define APR_HAVE_SYS_UN_H @sys_unh@
  95. #define APR_HAVE_SYS_WAIT_H @sys_waith@
  96. #define APR_HAVE_TIME_H @timeh@
  97. #define APR_HAVE_UNISTD_H @unistdh@
  98. /** @} */
  99. /* We don't include our conditional headers within the doxyblocks
  100. * or the extern "C" namespace
  101. */
  102. #if APR_HAVE_SYS_TYPES_H
  103. #include <sys/types.h>
  104. #endif
  105. #if APR_HAVE_SYS_SOCKET_H
  106. #include <sys/socket.h>
  107. #endif
  108. #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
  109. /* C99 7.18.4 requires that stdint.h only exposes INT64_C
  110. * and UINT64_C for C++ implementations if this is defined: */
  111. #define __STDC_CONSTANT_MACROS
  112. #endif
  113. #if APR_HAVE_STDINT_H
  114. #include <stdint.h>
  115. #endif
  116. #if APR_HAVE_SYS_WAIT_H
  117. #include <sys/wait.h>
  118. #endif
  119. #ifdef OS2
  120. #define INCL_DOS
  121. #define INCL_DOSERRORS
  122. #include <os2.h>
  123. #endif
  124. /* header files for PATH_MAX, _POSIX_PATH_MAX */
  125. #if APR_HAVE_LIMITS_H
  126. #include <limits.h>
  127. #else
  128. #if APR_HAVE_SYS_SYSLIMITS_H
  129. #include <sys/syslimits.h>
  130. #endif
  131. #endif
  132. #ifdef __cplusplus
  133. extern "C" {
  134. #endif
  135. /**
  136. * @addtogroup fspr_platform
  137. * @ingroup APR
  138. * @{
  139. */
  140. #define APR_HAVE_SHMEM_MMAP_TMP @havemmaptmp@
  141. #define APR_HAVE_SHMEM_MMAP_SHM @havemmapshm@
  142. #define APR_HAVE_SHMEM_MMAP_ZERO @havemmapzero@
  143. #define APR_HAVE_SHMEM_SHMGET_ANON @haveshmgetanon@
  144. #define APR_HAVE_SHMEM_SHMGET @haveshmget@
  145. #define APR_HAVE_SHMEM_MMAP_ANON @havemmapanon@
  146. #define APR_HAVE_SHMEM_BEOS @havebeosarea@
  147. #define APR_USE_SHMEM_MMAP_TMP @usemmaptmp@
  148. #define APR_USE_SHMEM_MMAP_SHM @usemmapshm@
  149. #define APR_USE_SHMEM_MMAP_ZERO @usemmapzero@
  150. #define APR_USE_SHMEM_SHMGET_ANON @useshmgetanon@
  151. #define APR_USE_SHMEM_SHMGET @useshmget@
  152. #define APR_USE_SHMEM_MMAP_ANON @usemmapanon@
  153. #define APR_USE_SHMEM_BEOS @usebeosarea@
  154. #define APR_USE_FLOCK_SERIALIZE @flockser@
  155. #define APR_USE_SYSVSEM_SERIALIZE @sysvser@
  156. #define APR_USE_POSIXSEM_SERIALIZE @posixser@
  157. #define APR_USE_FCNTL_SERIALIZE @fcntlser@
  158. #define APR_USE_PROC_PTHREAD_SERIALIZE @procpthreadser@
  159. #define APR_USE_PTHREAD_SERIALIZE @pthreadser@
  160. #define APR_HAS_FLOCK_SERIALIZE @hasflockser@
  161. #define APR_HAS_SYSVSEM_SERIALIZE @hassysvser@
  162. #define APR_HAS_POSIXSEM_SERIALIZE @hasposixser@
  163. #define APR_HAS_FCNTL_SERIALIZE @hasfcntlser@
  164. #define APR_HAS_PROC_PTHREAD_SERIALIZE @hasprocpthreadser@
  165. #define APR_PROCESS_LOCK_IS_GLOBAL @proclockglobal@
  166. #define APR_HAVE_CORKABLE_TCP @have_corkable_tcp@
  167. #define APR_HAVE_GETRLIMIT @have_getrlimit@
  168. #define APR_HAVE_IN_ADDR @have_in_addr@
  169. #define APR_HAVE_INET_ADDR @have_inet_addr@
  170. #define APR_HAVE_INET_NETWORK @have_inet_network@
  171. #define APR_HAVE_IPV6 @have_ipv6@
  172. #define APR_HAVE_MEMMOVE @have_memmove@
  173. #define APR_HAVE_SETRLIMIT @have_setrlimit@
  174. #define APR_HAVE_SIGACTION @have_sigaction@
  175. #define APR_HAVE_SIGSUSPEND @have_sigsuspend@
  176. #define APR_HAVE_SIGWAIT @have_sigwait@
  177. #define APR_HAVE_SA_STORAGE @have_sa_storage@
  178. #define APR_HAVE_STRCASECMP @have_strcasecmp@
  179. #define APR_HAVE_STRDUP @have_strdup@
  180. #define APR_HAVE_STRICMP @have_stricmp@
  181. #define APR_HAVE_STRNCASECMP @have_strncasecmp@
  182. #define APR_HAVE_STRNICMP @have_strnicmp@
  183. #define APR_HAVE_STRSTR @have_strstr@
  184. #define APR_HAVE_MEMCHR @have_memchr@
  185. #define APR_HAVE_STRUCT_RLIMIT @struct_rlimit@
  186. #define APR_HAVE_UNION_SEMUN @have_union_semun@
  187. #define APR_HAVE_SCTP @have_sctp@
  188. /* APR Feature Macros */
  189. #define APR_HAS_SHARED_MEMORY @sharedmem@
  190. #define APR_HAS_THREADS @threads@
  191. #define APR_HAS_SENDFILE @sendfile@
  192. #define APR_HAS_MMAP @mmap@
  193. #define APR_HAS_FORK @fork@
  194. #define APR_HAS_RANDOM @rand@
  195. #define APR_HAS_OTHER_CHILD @oc@
  196. #define APR_HAS_DSO @aprdso@
  197. #define APR_HAS_SO_ACCEPTFILTER @acceptfilter@
  198. #define APR_HAS_UNICODE_FS 0
  199. #define APR_HAS_PROC_INVOKED 0
  200. #define APR_HAS_USER 1
  201. #define APR_HAS_LARGE_FILES @aprlfs@
  202. #define APR_HAS_XTHREAD_FILES 0
  203. #define APR_HAS_OS_UUID @osuuid@
  204. #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
  205. /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  206. * to poll on files/pipes.
  207. */
  208. #define APR_FILES_AS_SOCKETS @file_as_socket@
  209. /* This macro indicates whether or not EBCDIC is the native character set.
  210. */
  211. #define APR_CHARSET_EBCDIC @apr_charset_ebcdic@
  212. /* If we have a TCP implementation that can be "corked", what flag
  213. * do we use?
  214. */
  215. #define APR_TCP_NOPUSH_FLAG @apr_tcp_nopush_flag@
  216. /* Is the TCP_NODELAY socket option inherited from listening sockets?
  217. */
  218. #define APR_TCP_NODELAY_INHERITED @tcp_nodelay_inherited@
  219. /* Is the O_NONBLOCK flag inherited from listening sockets?
  220. */
  221. #define APR_O_NONBLOCK_INHERITED @o_nonblock_inherited@
  222. /* Typedefs that APR needs. */
  223. typedef unsigned char fspr_byte_t;
  224. typedef @short_value@ fspr_int16_t;
  225. typedef unsigned @short_value@ fspr_uint16_t;
  226. typedef @int_value@ fspr_int32_t;
  227. typedef unsigned @int_value@ fspr_uint32_t;
  228. typedef @long_value@ fspr_int64_t;
  229. typedef unsigned @long_value@ fspr_uint64_t;
  230. typedef @size_t_value@ fspr_size_t;
  231. typedef @ssize_t_value@ fspr_ssize_t;
  232. typedef @off_t_value@ fspr_off_t;
  233. typedef @socklen_t_value@ fspr_socklen_t;
  234. #define APR_SIZEOF_VOIDP @voidp_size@
  235. /* Are we big endian? */
  236. #define APR_IS_BIGENDIAN @bigendian@
  237. /* Mechanisms to properly type numeric literals */
  238. @int64_literal@
  239. @uint64_literal@
  240. /* Definitions that APR programs need to work properly. */
  241. /**
  242. * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
  243. * so that they follow the platform's calling convention.
  244. * @example
  245. */
  246. /** void* APR_THREAD_FUNC my_thread_entry_fn(fspr_thread_t *thd, void *data);
  247. */
  248. #define APR_THREAD_FUNC
  249. /**
  250. * The public APR functions are declared with APR_DECLARE(), so they may
  251. * use the most appropriate calling convention. Public APR functions with
  252. * variable arguments must use APR_DECLARE_NONSTD().
  253. *
  254. * @remark Both the declaration and implementations must use the same macro.
  255. * @example
  256. */
  257. /** APR_DECLARE(rettype) fspr_func(args)
  258. * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  259. * @remark Note that when APR compiles the library itself, it passes the
  260. * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
  261. * to export public symbols from the dynamic library build.\n
  262. * The user must define the APR_DECLARE_STATIC when compiling to target
  263. * the static APR library on some platforms (e.g. Win32.) The public symbols
  264. * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
  265. * By default, compiling an application and including the APR public
  266. * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
  267. * linked to the dynamic library.
  268. */
  269. #define APR_DECLARE(type) type
  270. /**
  271. * The public APR functions using variable arguments are declared with
  272. * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  273. * @see APR_DECLARE @see APR_DECLARE_DATA
  274. * @remark Both the declaration and implementations must use the same macro.
  275. * @example
  276. */
  277. /** APR_DECLARE_NONSTD(rettype) fspr_func(args, ...);
  278. */
  279. #define APR_DECLARE_NONSTD(type) type
  280. /**
  281. * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
  282. * This assures the appropriate indirection is invoked at compile time.
  283. * @see APR_DECLARE @see APR_DECLARE_NONSTD
  284. * @remark Note that the declaration and implementations use different forms,
  285. * but both must include the macro.
  286. * @example
  287. */
  288. /** extern APR_DECLARE_DATA type fspr_variable;\n
  289. * APR_DECLARE_DATA type fspr_variable = value;
  290. */
  291. #define APR_DECLARE_DATA
  292. /* Define APR_SSIZE_T_FMT.
  293. * If ssize_t is an integer we define it to be "d",
  294. * if ssize_t is a long int we define it to be "ld",
  295. * if ssize_t is neither we declare an error here.
  296. * I looked for a better way to define this here, but couldn't find one, so
  297. * to find the logic for this definition search for "ssize_t_fmt" in
  298. * configure.ac.
  299. */
  300. @ssize_t_fmt@
  301. /* And APR_SIZE_T_FMT */
  302. @size_t_fmt@
  303. /* And APR_OFF_T_FMT */
  304. @off_t_fmt@
  305. /* And APR_PID_T_FMT */
  306. @pid_t_fmt@
  307. /* And APR_INT64_T_FMT */
  308. @int64_t_fmt@
  309. /* And APR_UINT64_T_FMT */
  310. @uint64_t_fmt@
  311. /* And APR_UINT64_T_HEX_FMT */
  312. @uint64_t_hex_fmt@
  313. /* Does the proc mutex lock threads too */
  314. #define APR_PROC_MUTEX_IS_GLOBAL @proc_mutex_is_global@
  315. /* Local machine definition for console and log output. */
  316. #define APR_EOL_STR "@eolstr@"
  317. #if APR_HAVE_SYS_WAIT_H
  318. #ifdef WEXITSTATUS
  319. #define fspr_wait_t int
  320. #else
  321. #define fspr_wait_t union wait
  322. #define WEXITSTATUS(status) (int)((status).w_retcode)
  323. #define WTERMSIG(status) (int)((status).w_termsig)
  324. #endif /* !WEXITSTATUS */
  325. #endif /* HAVE_SYS_WAIT_H */
  326. #if defined(PATH_MAX)
  327. #define APR_PATH_MAX PATH_MAX
  328. #elif defined(_POSIX_PATH_MAX)
  329. #define APR_PATH_MAX _POSIX_PATH_MAX
  330. #elif defined(_XOPEN_PATH_MAX)
  331. #define APR_PATH_MAX _XOPEN_PATH_MAX
  332. #else
  333. #error no decision has been made on APR_PATH_MAX for your platform
  334. #endif
  335. /** @} */
  336. #ifdef __cplusplus
  337. }
  338. #endif
  339. #endif /* APR_H */