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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
21
/* GENERATED FILE WARNING! DO NOT EDIT apr.h
23
* You must modify apr.h.in instead.
25
* And please, make an effort to stub apr.hw and apr.hnw in the process.
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.
37
* @defgroup APR Apache Portability Runtime library
41
* @defgroup apr_platform Platform Definitions
44
* <strong><em>The actual values of macros and typedefs on this page<br>
45
* are platform specific and should NOT be relied upon!</em></strong>
48
/* So that we can use inline on some critical functions, and use
49
* GNUC attributes (such as to get -Wall warnings for printf-like
50
* functions). Only do this in gcc 2.7 or later ... it may work
51
* on earlier stuff, but why chance it.
53
* We've since discovered that the gcc shipped with NeXT systems
54
* as "cc" is completely broken. It claims to be __GNUC__ and so
55
* on, but it doesn't implement half of the things that __GNUC__
56
* means. In particular it's missing inline and the __attribute__
57
* stuff. So we hack around it. PR#1613. -djg
59
#if !defined(__GNUC__) || __GNUC__ < 2 || \
60
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
63
#define __attribute__(__x)
66
#define APR_HAS_INLINE 0
68
#define APR_INLINE __inline__
69
#define APR_HAS_INLINE 1
72
#define APR_HAVE_ARPA_INET_H 1
73
#define APR_HAVE_CONIO_H 0
74
#define APR_HAVE_CRYPT_H 1
75
#define APR_HAVE_CTYPE_H 1
76
#define APR_HAVE_DIRENT_H 1
77
#define APR_HAVE_ERRNO_H 1
78
#define APR_HAVE_FCNTL_H 1
79
#define APR_HAVE_IO_H 0
80
#define APR_HAVE_LIMITS_H 1
81
#define APR_HAVE_NETDB_H 1
82
#define APR_HAVE_NETINET_IN_H 1
83
#define APR_HAVE_NETINET_SCTP_H 0
84
#define APR_HAVE_NETINET_SCTP_UIO_H 0
85
#define APR_HAVE_NETINET_TCP_H 1
86
#define APR_HAVE_PTHREAD_H 1
87
#define APR_HAVE_SEMAPHORE_H 1
88
#define APR_HAVE_SIGNAL_H 1
89
#define APR_HAVE_STDARG_H 1
90
#define APR_HAVE_STDINT_H 1
91
#define APR_HAVE_STDIO_H 1
92
#define APR_HAVE_STDLIB_H 1
93
#define APR_HAVE_STRING_H 1
94
#define APR_HAVE_STRINGS_H 1
95
#define APR_HAVE_SYS_IOCTL_H 1
96
#define APR_HAVE_SYS_SENDFILE_H 1
97
#define APR_HAVE_SYS_SIGNAL_H 1
98
#define APR_HAVE_SYS_SOCKET_H 1
99
#define APR_HAVE_SYS_SOCKIO_H 0
100
#define APR_HAVE_SYS_SYSLIMITS_H 0
101
#define APR_HAVE_SYS_TIME_H 1
102
#define APR_HAVE_SYS_TYPES_H 1
103
#define APR_HAVE_SYS_UIO_H 1
104
#define APR_HAVE_SYS_UN_H 1
105
#define APR_HAVE_SYS_WAIT_H 1
106
#define APR_HAVE_TIME_H 1
107
#define APR_HAVE_UNISTD_H 1
108
#define APR_HAVE_WINDOWS_H 0
109
#define APR_HAVE_WINSOCK2_H 0
114
/* We don't include our conditional headers within the doxyblocks
115
* or the extern "C" namespace
118
#if APR_HAVE_WINDOWS_H
122
#if APR_HAVE_WINSOCK2_H
123
#include <winsock2.h>
126
#if APR_HAVE_SYS_TYPES_H
127
#include <sys/types.h>
130
#if APR_HAVE_SYS_SOCKET_H
131
#include <sys/socket.h>
134
#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
135
/* C99 7.18.4 requires that stdint.h only exposes INT64_C
136
* and UINT64_C for C++ implementations if this is defined: */
137
#define __STDC_CONSTANT_MACROS
140
#if APR_HAVE_STDINT_H
144
#if APR_HAVE_SYS_WAIT_H
145
#include <sys/wait.h>
150
#define INCL_DOSERRORS
154
/* header files for PATH_MAX, _POSIX_PATH_MAX */
155
#if APR_HAVE_LIMITS_H
158
#if APR_HAVE_SYS_SYSLIMITS_H
159
#include <sys/syslimits.h>
169
* @addtogroup apr_platform
174
#define APR_HAVE_SHMEM_MMAP_TMP 1
175
#define APR_HAVE_SHMEM_MMAP_SHM 1
176
#define APR_HAVE_SHMEM_MMAP_ZERO 1
177
#define APR_HAVE_SHMEM_SHMGET_ANON 1
178
#define APR_HAVE_SHMEM_SHMGET 1
179
#define APR_HAVE_SHMEM_MMAP_ANON 1
180
#define APR_HAVE_SHMEM_BEOS 0
182
#define APR_USE_SHMEM_MMAP_TMP 0
183
#define APR_USE_SHMEM_MMAP_SHM 0
184
#define APR_USE_SHMEM_MMAP_ZERO 0
185
#define APR_USE_SHMEM_SHMGET_ANON 0
186
#define APR_USE_SHMEM_SHMGET 1
187
#define APR_USE_SHMEM_MMAP_ANON 1
188
#define APR_USE_SHMEM_BEOS 0
190
#define APR_USE_FLOCK_SERIALIZE 0
191
#define APR_USE_SYSVSEM_SERIALIZE 1
192
#define APR_USE_POSIXSEM_SERIALIZE 0
193
#define APR_USE_FCNTL_SERIALIZE 0
194
#define APR_USE_PROC_PTHREAD_SERIALIZE 0
195
#define APR_USE_PTHREAD_SERIALIZE 1
197
#define APR_HAS_FLOCK_SERIALIZE 1
198
#define APR_HAS_SYSVSEM_SERIALIZE 1
199
#define APR_HAS_POSIXSEM_SERIALIZE 1
200
#define APR_HAS_FCNTL_SERIALIZE 1
201
#define APR_HAS_PROC_PTHREAD_SERIALIZE 1
203
#define APR_PROCESS_LOCK_IS_GLOBAL 0
205
#define APR_HAVE_CORKABLE_TCP 1
206
#define APR_HAVE_GETRLIMIT 1
207
#define APR_HAVE_IN_ADDR 1
208
#define APR_HAVE_INET_ADDR 1
209
#define APR_HAVE_INET_NETWORK 1
210
#define APR_HAVE_IPV6 1
211
#define APR_HAVE_MEMMOVE 1
212
#define APR_HAVE_SETRLIMIT 1
213
#define APR_HAVE_SIGACTION 1
214
#define APR_HAVE_SIGSUSPEND 1
215
#define APR_HAVE_SIGWAIT 1
216
#define APR_HAVE_SA_STORAGE 1
217
#define APR_HAVE_STRCASECMP 1
218
#define APR_HAVE_STRDUP 1
219
#define APR_HAVE_STRICMP 0
220
#define APR_HAVE_STRNCASECMP 1
221
#define APR_HAVE_STRNICMP 0
222
#define APR_HAVE_STRSTR 1
223
#define APR_HAVE_MEMCHR 1
224
#define APR_HAVE_STRUCT_RLIMIT 1
225
#define APR_HAVE_UNION_SEMUN 0
226
#define APR_HAVE_SCTP 0
227
#define APR_HAVE_IOVEC 1
229
/* APR Feature Macros */
230
#define APR_HAS_SHARED_MEMORY 1
231
#define APR_HAS_THREADS 1
232
#define APR_HAS_SENDFILE 1
233
#define APR_HAS_MMAP 1
234
#define APR_HAS_FORK 1
235
#define APR_HAS_RANDOM 1
236
#define APR_HAS_OTHER_CHILD 1
237
#define APR_HAS_DSO 1
238
#define APR_HAS_SO_ACCEPTFILTER 0
239
#define APR_HAS_UNICODE_FS 0
240
#define APR_HAS_PROC_INVOKED 0
241
#define APR_HAS_USER 1
242
#define APR_HAS_LARGE_FILES 0
243
#define APR_HAS_XTHREAD_FILES 0
244
#define APR_HAS_OS_UUID 0
246
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
248
/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
249
* to poll on files/pipes.
251
#define APR_FILES_AS_SOCKETS 1
253
/* This macro indicates whether or not EBCDIC is the native character set.
255
#define APR_CHARSET_EBCDIC 0
257
/* If we have a TCP implementation that can be "corked", what flag
260
#define APR_TCP_NOPUSH_FLAG TCP_CORK
262
/* Is the TCP_NODELAY socket option inherited from listening sockets?
264
#define APR_TCP_NODELAY_INHERITED 1
266
/* Is the O_NONBLOCK flag inherited from listening sockets?
268
#define APR_O_NONBLOCK_INHERITED 0
270
/* Typedefs that APR needs. */
272
typedef unsigned char apr_byte_t;
274
typedef short apr_int16_t;
275
typedef unsigned short apr_uint16_t;
277
typedef int apr_int32_t;
278
typedef unsigned int apr_uint32_t;
280
typedef long apr_int64_t;
281
typedef unsigned long apr_uint64_t;
283
typedef size_t apr_size_t;
284
typedef ssize_t apr_ssize_t;
285
typedef off_t apr_off_t;
286
typedef socklen_t apr_socklen_t;
287
typedef ino_t apr_ino_t;
289
#define APR_SIZEOF_VOIDP 8
291
#if APR_SIZEOF_VOIDP == 8
292
typedef apr_uint64_t apr_uintptr_t;
294
typedef apr_uint32_t apr_uintptr_t;
297
/* Are we big endian? */
298
#define APR_IS_BIGENDIAN 0
300
/* Mechanisms to properly type numeric literals */
301
#define APR_INT64_C(val) INT64_C(val)
302
#define APR_UINT64_C(val) UINT64_C(val)
305
#define APR_INT16_MIN INT16_MIN
307
#define APR_INT16_MIN (-0x7fff - 1)
311
#define APR_INT16_MAX INT16_MAX
313
#define APR_INT16_MAX (0x7fff)
317
#define APR_UINT16_MAX UINT16_MAX
319
#define APR_UINT16_MAX (0xffff)
323
#define APR_INT32_MIN INT32_MIN
325
#define APR_INT32_MIN (-0x7fffffff - 1)
329
#define APR_INT32_MAX INT32_MAX
331
#define APR_INT32_MAX 0x7fffffff
335
#define APR_UINT32_MAX UINT32_MAX
337
#define APR_UINT32_MAX (0xffffffffU)
341
#define APR_INT64_MIN INT64_MIN
343
#define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
347
#define APR_INT64_MAX INT64_MAX
349
#define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
353
#define APR_UINT64_MAX UINT64_MAX
355
#define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
358
#define APR_SIZE_MAX (~((apr_size_t)0))
361
/* Definitions that APR programs need to work properly. */
364
* APR public API wrap for C++ compilers.
367
#define APR_BEGIN_DECLS extern "C" {
368
#define APR_END_DECLS }
370
#define APR_BEGIN_DECLS
371
#define APR_END_DECLS
375
* Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
376
* so that they follow the platform's calling convention.
379
* void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
383
#define APR_THREAD_FUNC
386
* The public APR functions are declared with APR_DECLARE(), so they may
387
* use the most appropriate calling convention. Public APR functions with
388
* variable arguments must use APR_DECLARE_NONSTD().
390
* @remark Both the declaration and implementations must use the same macro.
393
* APR_DECLARE(rettype) apr_func(args)
395
* @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
396
* @remark Note that when APR compiles the library itself, it passes the
397
* symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
398
* to export public symbols from the dynamic library build.\n
399
* The user must define the APR_DECLARE_STATIC when compiling to target
400
* the static APR library on some platforms (e.g. Win32.) The public symbols
401
* are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
402
* By default, compiling an application and including the APR public
403
* headers, without defining APR_DECLARE_STATIC, will prepare the code to be
404
* linked to the dynamic library.
406
#define APR_DECLARE(type) type
409
* The public APR functions using variable arguments are declared with
410
* APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
411
* @see APR_DECLARE @see APR_DECLARE_DATA
412
* @remark Both the declaration and implementations must use the same macro.
415
* APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
419
#define APR_DECLARE_NONSTD(type) type
422
* The public APR variables are declared with AP_MODULE_DECLARE_DATA.
423
* This assures the appropriate indirection is invoked at compile time.
424
* @see APR_DECLARE @see APR_DECLARE_NONSTD
425
* @remark Note that the declaration and implementations use different forms,
426
* but both must include the macro.
430
* extern APR_DECLARE_DATA type apr_variable;\n
431
* APR_DECLARE_DATA type apr_variable = value;
435
#define APR_DECLARE_DATA
437
/* Define APR_SSIZE_T_FMT.
438
* If ssize_t is an integer we define it to be "d",
439
* if ssize_t is a long int we define it to be "ld",
440
* if ssize_t is neither we declare an error here.
441
* I looked for a better way to define this here, but couldn't find one, so
442
* to find the logic for this definition search for "ssize_t_fmt" in
445
#define APR_SSIZE_T_FMT "ld"
447
/* And APR_SIZE_T_FMT */
448
#define APR_SIZE_T_FMT "lu"
450
/* And APR_OFF_T_FMT */
451
#define APR_OFF_T_FMT "ld"
453
/* And APR_PID_T_FMT */
454
#define APR_PID_T_FMT "d"
456
/* And APR_INT64_T_FMT */
457
#define APR_INT64_T_FMT "ld"
459
/* And APR_UINT64_T_FMT */
460
#define APR_UINT64_T_FMT "lu"
462
/* And APR_UINT64_T_HEX_FMT */
463
#define APR_UINT64_T_HEX_FMT "lx"
465
/* Does the proc mutex lock threads too */
466
#define APR_PROC_MUTEX_IS_GLOBAL 0
468
/* Local machine definition for console and log output. */
469
#define APR_EOL_STR "\n"
471
#if APR_HAVE_SYS_WAIT_H
473
#define apr_wait_t int
475
#define apr_wait_t union wait
476
#define WEXITSTATUS(status) (int)((status).w_retcode)
477
#define WTERMSIG(status) (int)((status).w_termsig)
478
#endif /* !WEXITSTATUS */
479
#elif defined(__MINGW32__)
480
typedef int apr_wait_t;
481
#endif /* HAVE_SYS_WAIT_H */
483
#if defined(PATH_MAX)
484
#define APR_PATH_MAX PATH_MAX
485
#elif defined(_POSIX_PATH_MAX)
486
#define APR_PATH_MAX _POSIX_PATH_MAX
488
#error no decision has been made on APR_PATH_MAX for your platform
491
#define APR_DSOPATH "LD_LIBRARY_PATH"
495
/* Definitions that only Win32 programs need to compile properly. */
497
/* XXX These simply don't belong here, perhaps in apr_portable.h
498
* based on some APR_HAVE_PID/GID/UID?