apr.hnw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  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.hnw instead.
  21. *
  22. * And please, make an effort to stub apr.hw and apr.h.in in the process.
  23. *
  24. * This is the NetWare specific version of apr.h. It is copied from
  25. * apr.hnw at the start of a NetWare build by the ./build/NWGNmakefile.
  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. #if defined(NETWARE) || defined(DOXYGEN)
  35. #undef FD_SETSIZE
  36. #define FD_SETSIZE 1024
  37. #include <sys/types.h>
  38. #include <stddef.h>
  39. #include <stdio.h>
  40. #include <time.h>
  41. #include <stdint.h>
  42. #include <stdlib.h>
  43. #include <string.h>
  44. #include <limits.h>
  45. #include <netware.h>
  46. #include <nks/thread.h>
  47. #include <nks/synch.h>
  48. #include <nks/time.h>
  49. #include <signal.h>
  50. #ifdef USE_WINSOCK
  51. #include <novsock2.h>
  52. #ifdef NW_BUILD_IPV6
  53. #include <novtcpip.h>
  54. #endif
  55. #else
  56. #include <sys/socket.h>
  57. #include <sys/select.h>
  58. #endif
  59. #include <sys/types.h>
  60. #define _POSIX_THREAD_SAFE_FUNCTIONS 1
  61. #define READDIR_IS_THREAD_SAFE 1
  62. /* Keep #include'd headers from within the __cplusplus or doxyblocks */
  63. #ifdef __cplusplus
  64. extern "C" {
  65. #endif
  66. /**
  67. * @defgroup apr_platform Platform Definitions
  68. * @ingroup APR
  69. * @{
  70. */
  71. #define APR_INLINE
  72. #define APR_HAS_INLINE 0
  73. #ifndef __attribute__
  74. #define __attribute__(__x)
  75. #endif
  76. #define ENUM_BITFIELD(e,n,w) signed int n : w
  77. #define APR_HAVE_CONIO_H 0
  78. #define APR_HAVE_CRYPT_H 0
  79. #define APR_HAVE_CTYPE_H 1
  80. #define APR_HAVE_DIRENT_H 1
  81. #define APR_HAVE_ERRNO_H 1
  82. #define APR_HAVE_FCNTL_H 1
  83. #define APR_HAVE_IO_H 0
  84. #define APR_HAVE_LIMITS_H 1
  85. #ifdef USE_WINSOCK
  86. #define APR_HAVE_ARPA_INET_H 0
  87. #define APR_HAVE_NETDB_H 0
  88. #define APR_HAVE_NETINET_IN_H 0
  89. #else
  90. #define APR_HAVE_ARPA_INET_H 1
  91. #define APR_HAVE_NETDB_H 1
  92. #define APR_HAVE_NETINET_IN_H 1
  93. #endif
  94. #define APR_HAVE_NETINET_SCTP_H 0
  95. #define APR_HAVE_NETINET_SCTP_UIO_H 0
  96. #define APR_HAVE_NETINET_TCP_H 0
  97. #define APR_HAVE_PTHREAD_H 0
  98. #define APR_HAVE_SIGNAL_H 1
  99. #define APR_HAVE_STDARG_H 1
  100. #define APR_HAVE_STDINT_H 0
  101. #define APR_HAVE_STDIO_H 1
  102. #define APR_HAVE_STDLIB_H 1
  103. #define APR_HAVE_STRING_H 1
  104. #define APR_HAVE_STRINGS_H 0
  105. #define APR_HAVE_STRTOLL 1
  106. #define APR_HAVE_SYS_SENDFILE_H 0
  107. #define APR_HAVE_SYS_SYSLIMITS_H 0
  108. #ifdef USE_WINSOCK
  109. #define APR_HAVE_SYS_SOCKET_H 0
  110. #define APR_HAVE_SYS_SOCKIO_H 0
  111. #define APR_HAVE_SYS_UN_H 0
  112. #else
  113. #define APR_HAVE_SYS_SOCKET_H 1
  114. #define APR_HAVE_SYS_SOCKIO_H 1
  115. #define APR_HAVE_SYS_UN_H 1
  116. #endif
  117. #define APR_HAVE_SYS_SIGNAL_H 1
  118. #define APR_HAVE_SYS_TIME_H 1
  119. #define APR_HAVE_SYS_TYPES_H 1
  120. #define APR_HAVE_SYS_UIO_H 1
  121. #define APR_HAVE_SYS_WAIT_H 1
  122. #define APR_HAVE_TIME_H 1
  123. #define APR_HAVE_UNISTD_H 1
  124. #define APR_HAVE_SHMEM_MMAP_TMP 0
  125. #define APR_HAVE_SHMEM_MMAP_SHM 0
  126. #define APR_HAVE_SHMEM_MMAP_ZERO 0
  127. #define APR_HAVE_SHMEM_SHMGET_ANON 0
  128. #define APR_HAVE_SHMEM_SHMGET 0
  129. #define APR_HAVE_SHMEM_MMAP_ANON 0
  130. #define APR_HAVE_SHMEM_BEOS 0
  131. #define APR_USE_SHMEM_MMAP_TMP 0
  132. #define APR_USE_SHMEM_MMAP_SHM 0
  133. #define APR_USE_SHMEM_MMAP_ZERO 0
  134. #define APR_USE_SHMEM_SHMGET_ANON 0
  135. #define APR_USE_SHMEM_SHMGET 0
  136. #define APR_USE_SHMEM_MMAP_ANON 0
  137. #define APR_USE_SHMEM_BEOS 0
  138. #define APR_USE_FLOCK_SERIALIZE 0
  139. #define APR_USE_SYSVSEM_SERIALIZE 0
  140. #define APR_USE_FCNTL_SERIALIZE 0
  141. #define APR_USE_PROC_PTHREAD_SERIALIZE 0
  142. #define APR_USE_PTHREAD_SERIALIZE 0
  143. #define APR_HAS_FLOCK_SERIALIZE 0
  144. #define APR_HAS_SYSVSEM_SERIALIZE 0
  145. #define APR_HAS_FCNTL_SERIALIZE 0
  146. #define APR_HAS_PROC_PTHREAD_SERIALIZE 0
  147. #define APR_HAS_RWLOCK_SERIALIZE 0
  148. #define APR_HAS_LOCK_CREATE_NP 0
  149. #define APR_PROCESS_LOCK_IS_GLOBAL 1
  150. #define APR_FILE_BASED_SHM 0
  151. #define APR_HAVE_CORKABLE_TCP 0
  152. #define APR_HAVE_GETRLIMIT 0
  153. #define APR_HAVE_ICONV 0
  154. #define APR_HAVE_IN_ADDR 1
  155. #define APR_HAVE_INET_ADDR 1
  156. #define APR_HAVE_INET_NETWORK 0
  157. #ifdef NW_BUILD_IPV6
  158. #define APR_HAVE_IPV6 1
  159. #else
  160. #define APR_HAVE_IPV6 0
  161. #endif
  162. #define APR_HAVE_MEMCHR 1
  163. #define APR_HAVE_MEMMOVE 1
  164. #define APR_HAVE_SETRLIMIT 0
  165. #define APR_HAVE_SIGACTION 0
  166. #define APR_HAVE_SIGSUSPEND 0
  167. #define APR_HAVE_SIGWAIT 0
  168. #define APR_HAVE_STRCASECMP 1
  169. #define APR_HAVE_STRDUP 1
  170. #define APR_HAVE_STRICMP 1
  171. #define APR_HAVE_STRNCASECMP 1
  172. #define APR_HAVE_STRNICMP 1
  173. #define APR_HAVE_STRSTR 1
  174. #define APR_HAVE_STRUCT_RLIMIT 0
  175. #define APR_HAVE_UNION_SEMUN 0
  176. #define APR_HAVE_SCTP 0
  177. #define APR_HAVE_IOVEC 1
  178. /* APR Feature Macros */
  179. #define APR_HAS_SHARED_MEMORY 0
  180. #define APR_HAS_THREADS 1
  181. #define APR_HAS_SENDFILE 0
  182. #define APR_HAS_MMAP 0
  183. #define APR_HAS_FORK 0
  184. #define APR_HAS_RANDOM 1
  185. #define APR_HAS_OTHER_CHILD 0
  186. #define APR_HAS_DSO 1
  187. #define APR_HAS_SO_ACCEPTFILTER 0
  188. #define APR_HAS_UNICODE_FS 0
  189. #define APR_HAS_PROC_INVOKED 0
  190. #define APR_HAS_USER 1
  191. #define APR_HAS_LARGE_FILES 1
  192. #define APR_HAS_XTHREAD_FILES 0
  193. #define APR_HAS_OS_UUID 0
  194. #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
  195. /* Netware can poll on files/pipes.
  196. */
  197. #define APR_FILES_AS_SOCKETS 1
  198. /* This macro indicates whether or not EBCDIC is the native character set.
  199. */
  200. #define APR_CHARSET_EBCDIC 0
  201. /* Is the TCP_NODELAY socket option inherited from listening sockets?
  202. */
  203. #define APR_TCP_NODELAY_INHERITED 1
  204. /* Is the O_NONBLOCK flag inherited from listening sockets?
  205. */
  206. #define APR_O_NONBLOCK_INHERITED 1
  207. /* Typedefs that APR needs. */
  208. typedef unsigned char apr_byte_t;
  209. typedef short apr_int16_t;
  210. typedef unsigned short apr_uint16_t;
  211. typedef int apr_int32_t;
  212. typedef unsigned int apr_uint32_t;
  213. typedef long long apr_int64_t;
  214. typedef unsigned long long apr_uint64_t;
  215. typedef size_t apr_size_t;
  216. typedef ssize_t apr_ssize_t;
  217. #if APR_HAS_LARGE_FILES
  218. typedef off64_t apr_off_t;
  219. #else
  220. typedef off_t apr_off_t;
  221. #endif
  222. #ifdef USE_WINSOCK
  223. typedef int apr_socklen_t;
  224. #else
  225. typedef size_t apr_socklen_t;
  226. #endif
  227. typedef apr_uint64_t apr_ino_t;
  228. /* Are we big endian? */
  229. /* XXX: Fatal assumption on Alpha platforms */
  230. #define APR_IS_BIGENDIAN 0
  231. #ifdef UNKNOWN_NETWARE_64BIT_FLAG_NEEDED
  232. #define APR_SIZEOF_VOIDP 8
  233. #else
  234. #define APR_SIZEOF_VOIDP 4
  235. #endif
  236. #if APR_SIZEOF_VOIDP == 8
  237. typedef apr_uint64_t apr_uintptr_t;
  238. #else
  239. typedef apr_uint32_t apr_uintptr_t;
  240. #endif
  241. /* Mechanisms to properly type numeric literals */
  242. #define APR_INT64_C(val) (val##LL)
  243. #define APR_UINT64_C(val) (val##ULL)
  244. #ifdef INT16_MIN
  245. #define APR_INT16_MIN INT16_MIN
  246. #else
  247. #define APR_INT16_MIN (-0x7fff - 1)
  248. #endif
  249. #ifdef INT16_MAX
  250. #define APR_INT16_MAX INT16_MAX
  251. #else
  252. #define APR_INT16_MAX (0x7fff)
  253. #endif
  254. #ifdef UINT16_MAX
  255. #define APR_UINT16_MAX UINT16_MAX
  256. #else
  257. #define APR_UINT16_MAX (0xffff)
  258. #endif
  259. #ifdef INT32_MIN
  260. #define APR_INT32_MIN INT32_MIN
  261. #else
  262. #define APR_INT32_MIN (-0x7fffffff - 1)
  263. #endif
  264. #ifdef INT32_MAX
  265. #define APR_INT32_MAX INT32_MAX
  266. #else
  267. #define APR_INT32_MAX 0x7fffffff
  268. #endif
  269. #ifdef UINT32_MAX
  270. #define APR_UINT32_MAX UINT32_MAX
  271. #else
  272. #define APR_UINT32_MAX (0xffffffffU)
  273. #endif
  274. #ifdef INT64_MIN
  275. #define APR_INT64_MIN INT64_MIN
  276. #else
  277. #define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
  278. #endif
  279. #ifdef INT64_MAX
  280. #define APR_INT64_MAX INT64_MAX
  281. #else
  282. #define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
  283. #endif
  284. #ifdef UINT64_MAX
  285. #define APR_UINT64_MAX UINT64_MAX
  286. #else
  287. #define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
  288. #endif
  289. #define APR_SIZE_MAX (~((apr_size_t)0))
  290. /* PROC mutex is a GLOBAL mutex on Netware */
  291. #define APR_PROC_MUTEX_IS_GLOBAL 1
  292. /* Definitions that APR programs need to work properly. */
  293. /**
  294. * APR public API wrap for C++ compilers.
  295. */
  296. #ifdef __cplusplus
  297. #define APR_BEGIN_DECLS extern "C" {
  298. #define APR_END_DECLS }
  299. #else
  300. #define APR_BEGIN_DECLS
  301. #define APR_END_DECLS
  302. #endif
  303. /**
  304. * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
  305. * so that they follow the platform's calling convention.
  306. * @example
  307. */
  308. /** void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
  309. */
  310. #define APR_THREAD_FUNC
  311. /**
  312. * The public APR functions are declared with APR_DECLARE(), so they may
  313. * use the most appropriate calling convention. Public APR functions with
  314. * variable arguments must use APR_DECLARE_NONSTD().
  315. *
  316. * @remark Both the declaration and implementations must use the same macro.
  317. * @example
  318. */
  319. /** APR_DECLARE(rettype) apr_func(args)
  320. * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  321. * @remark Note that when APR compiles the library itself, it passes the
  322. * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
  323. * to export public symbols from the dynamic library build.\n
  324. * The user must define the APR_DECLARE_STATIC when compiling to target
  325. * the static APR library on some platforms (e.g. Win32.) The public symbols
  326. * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
  327. * By default, compiling an application and including the APR public
  328. * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
  329. * linked to the dynamic library.
  330. */
  331. #define APR_DECLARE(type) type
  332. /**
  333. * The public APR functions using variable arguments are declared with
  334. * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  335. * @see APR_DECLARE @see APR_DECLARE_DATA
  336. * @remark Both the declaration and implementations must use the same macro.
  337. * @example
  338. */
  339. /** APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
  340. */
  341. #define APR_DECLARE_NONSTD(type) type
  342. /**
  343. * The public APR variables are declared with APR_DECLARE_DATA.
  344. * This assures the appropriate indirection is invoked at compile time.
  345. * @see APR_DECLARE @see APR_DECLARE_NONSTD
  346. * @remark Note that the declaration and implementations use different forms,
  347. * but both must include the macro.
  348. * @example
  349. */
  350. /** extern APR_DECLARE_DATA type apr_variable;\n
  351. * APR_DECLARE_DATA type apr_variable = value;
  352. */
  353. #define APR_DECLARE_DATA
  354. #define APR_SSIZE_T_FMT "d"
  355. #define APR_SIZE_T_FMT "d"
  356. #if APR_HAS_LARGE_FILES
  357. #define APR_OFF_T_FMT "lld"
  358. #else
  359. #define APR_OFF_T_FMT "ld"
  360. #endif
  361. #define APR_PID_T_FMT "d"
  362. /* Local machine definition for console and log output. */
  363. #define APR_EOL_STR "\r\n"
  364. typedef int apr_wait_t;
  365. #define APR_PATH_MAX PATH_MAX
  366. #define APR_DSOPATH "PATH"
  367. #define APR_INT64_T_FMT "lld"
  368. #define APR_UINT64_T_FMT "llu"
  369. #define APR_UINT64_T_HEX_FMT "llx"
  370. #define APR_TIME_T_FMT APR_INT64_T_FMT
  371. /** @} */
  372. #ifdef __cplusplus
  373. }
  374. #endif
  375. #endif /* NETWARE */
  376. #endif /* APR_H */