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