Apache Portable Runtime
Loading...
Searching...
No Matches
apr.h
Go to the documentation of this file.
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 * @warning
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>
46 */
47
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). Both __inline__ and __attribute__ exist for gcc >= 2.7,
51 * other !__GNUC__ compilers may provide __attribute__ still.
52 *
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
58 */
59#if defined(__GNUC__) \
60 && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) \
61 && !defined(NEXT)
62#define APR_INLINE __inline__
63#define APR_HAS_INLINE 1
64#else /* !__GNUC__ */
65#define APR_INLINE
66#define APR_HAS_INLINE 0
67/* __has_attribute should always be a pre-defined macro, but not
68 * necessarily __attribute__ (e.g. builtin), so check for both to
69 * avoid overriding __attribute__.
70 */
71#if !(defined(__attribute__) || defined(__has_attribute)) || defined(__SUNPRO_C)
72#define __attribute__(__x)
73#endif
74#endif /* !__GNUC__ */
75#ifndef __has_attribute
76#define __has_attribute(__x) 0
77#endif
78
79#define APR_HAVE_ARPA_INET_H 1
80#define APR_HAVE_CONIO_H 0
81#define APR_HAVE_CRYPT_H 1
82#define APR_HAVE_CTYPE_H 1
83#define APR_HAVE_DIRENT_H 1
84#define APR_HAVE_ERRNO_H 1
85#define APR_HAVE_FCNTL_H 1
86#define APR_HAVE_IFADDRS_H 1
87#define APR_HAVE_IO_H 0
88#define APR_HAVE_LIMITS_H 1
89#define APR_HAVE_MSWSOCK_H 0
90#define APR_HAVE_NETDB_H 1
91#define APR_HAVE_NETINET_IN_H 1
92#define APR_HAVE_NETINET_SCTP_H 1
93#define APR_HAVE_NETINET_SCTP_UIO_H 0
94#define APR_HAVE_NETINET_TCP_H 1
95#define APR_HAVE_PROCESS_H 0
96#define APR_HAVE_PTHREAD_H 1
97#define APR_HAVE_SEMAPHORE_H 1
98#define APR_HAVE_SIGNAL_H 1
99#define APR_HAVE_STDARG_H 1
100#define APR_HAVE_STDDEF_H 1
101#define APR_HAVE_STDINT_H 1
102#define APR_HAVE_STDIO_H 1
103#define APR_HAVE_STDLIB_H 1
104#define APR_HAVE_STRING_H 1
105#define APR_HAVE_STRINGS_H 1
106#define APR_HAVE_INTTYPES_H 1
107#define APR_HAVE_SYS_IOCTL_H 1
108#define APR_HAVE_SYS_SENDFILE_H 1
109#define APR_HAVE_SYS_SIGNAL_H 1
110#define APR_HAVE_SYS_SOCKET_H 1
111#define APR_HAVE_SYS_SOCKIO_H 0
112#define APR_HAVE_SYS_SYSLIMITS_H 0
113#define APR_HAVE_SYS_TIME_H 1
114#define APR_HAVE_SYS_TYPES_H 1
115#define APR_HAVE_SYS_UIO_H 1
116#define APR_HAVE_SYS_UN_H 1
117#define APR_HAVE_SYS_WAIT_H 1
118#define APR_HAVE_TIME_H 1
119#define APR_HAVE_UNISTD_H 1
120#define APR_HAVE_WINDOWS_H 0
121#define APR_HAVE_WINSOCK2_H 0
122#define APR_HAVE_WS2TCPIP_H 0
123
124/** @} */
125/** @} */
126
127/* We don't include our conditional headers within the doxyblocks
128 * or the extern "C" namespace
129 */
130
131#if APR_HAVE_WINDOWS_H && defined(WIN32)
132/* Has Windows.h already been included? If so, our preferences don't matter,
133 * but we will still need the winsock things no matter what was included.
134 * If not, include a restricted set of Windows headers to our tastes.
135 * Note: _WIN32_WINNT is not an APR toggle, and should be set to the current API
136 * level; it is not a minimum, it is a maximum. Newly added functions to Win32
137 * are maintained in apr_arch_misc.h for runtime (not build time) determination.
138 */
139#ifndef _WINDOWS_
140
141#ifndef WIN32_LEAN_AND_MEAN
142#define WIN32_LEAN_AND_MEAN
143#endif
144#ifndef _WIN32_WINNT
145#define _WIN32_WINNT 0x0A00
146#endif
147#ifndef NOUSER
148#define NOUSER
149#endif
150#ifndef NOMCX
151#define NOMCX
152#endif
153#ifndef NOIME
154#define NOIME
155#endif
156
157/* Impossible to include WinSock2.h after winsock.h, while Windows.h
158 * attempts to load winsock. Setting _WINSOCKAPI_ will dodge this.
159 */
160#if APR_HAVE_WINSOCK2_H
161#define _WINSOCKAPI_
162#endif
163
164#include <Windows.h>
165#endif /* ndef _WINDOWS_ */
166#endif /* APR_HAVE_WINDOWS_H */
167
168#if APR_HAVE_WINSOCK2_H
169#include <WinSock2.h>
170
171#if APR_HAVE_WS2TCPIP_H
172#include <WS2tcpip.h>
173#endif
174
175#if APR_HAVE_MSWSOCK_H
176#include <MSWSock.h>
177#endif
178
179#endif /* !APR_HAVE_WINSOCK2_H */
180
181#if APR_HAVE_SYS_TYPES_H
182#include <sys/types.h>
183#endif
184
185#if APR_HAVE_STDDEF_H
186#include <stddef.h>
187#endif
188
189#if APR_HAVE_SYS_SOCKET_H
190#include <sys/socket.h>
191#endif
192
193#if APR_HAVE_STDINT_H
194#ifdef __cplusplus
195/* C99 7.18.4 requires that stdint.h only exposes INT64_C
196 * and UINT64_C for C++ implementations if this is defined: */
197#ifndef __STDC_CONSTANT_MACROS
198#define __STDC_CONSTANT_MACROS
199#endif
200/* C++ needs this too for PRI*NN formats: */
201#ifndef __STDC_FORMAT_MACROS
202#define __STDC_FORMAT_MACROS
203#endif
204#endif /* __cplusplus */
205#include <stdint.h>
206#endif
207
208#if APR_HAVE_INTTYPES_H
209#include <inttypes.h>
210#endif
211
212#if APR_HAVE_SYS_WAIT_H
213#include <sys/wait.h>
214#endif
215
216#ifdef OS2
217#define INCL_DOS
218#define INCL_DOSERRORS
219#include <os2.h>
220#endif
221
222/* header files for PATH_MAX, _POSIX_PATH_MAX */
223#if APR_HAVE_LIMITS_H
224#include <limits.h>
225#else
226#if APR_HAVE_SYS_SYSLIMITS_H
227#include <sys/syslimits.h>
228#endif
229#endif
230
231/* __APPLE__ is now the official pre-defined macro for macOS */
232#ifdef __APPLE__
233#undef DARWIN
234#undef DARWIN_10
235#define DARWIN
236#define DARWIN_10
237#endif /* __APPLE__ */
238
239#ifdef __cplusplus
240extern "C" {
241#endif
242
243/**
244 * @addtogroup apr_platform
245 * @ingroup APR
246 * @{
247 */
248
249#define APR_HAVE_SHMEM_MMAP_TMP 1
250#define APR_HAVE_SHMEM_MMAP_SHM 1
251#define APR_HAVE_SHMEM_MMAP_ZERO 1
252#define APR_HAVE_SHMEM_SHMGET_ANON 1
253#define APR_HAVE_SHMEM_SHMGET 1
254#define APR_HAVE_SHMEM_MMAP_ANON 1
255#define APR_HAVE_SHMEM_BEOS 0
256
257#define APR_USE_SHMEM_MMAP_TMP 0
258#define APR_USE_SHMEM_MMAP_SHM 1
259#define APR_USE_SHMEM_MMAP_ZERO 0
260#define APR_USE_SHMEM_SHMGET_ANON 0
261#define APR_USE_SHMEM_SHMGET 0
262#define APR_USE_SHMEM_MMAP_ANON 1
263#define APR_USE_SHMEM_BEOS 0
264
265#define APR_USE_FLOCK_SERIALIZE 0
266#define APR_USE_SYSVSEM_SERIALIZE 0
267#define APR_USE_POSIXSEM_SERIALIZE 0
268#define APR_USE_FCNTL_SERIALIZE 0
269#define APR_USE_PROC_PTHREAD_SERIALIZE 1
270#define APR_USE_PTHREAD_SERIALIZE 1
271
272#define APR_HAS_FLOCK_SERIALIZE 1
273#define APR_HAS_SYSVSEM_SERIALIZE 1
274#define APR_HAS_POSIXSEM_SERIALIZE 1
275#define APR_HAS_FCNTL_SERIALIZE 1
276#define APR_HAS_PROC_PTHREAD_SERIALIZE 1
277
278#define APR_PROCESS_LOCK_IS_GLOBAL 0
279
280#define APR_HAVE_CORKABLE_TCP 1
281#define APR_HAVE_GETRLIMIT 1
282#define APR_HAVE_IN_ADDR 1
283#define APR_HAVE_INET_ADDR 1
284#define APR_HAVE_INET_NETWORK 1
285#define APR_HAVE_IPV6 1
286#define APR_HAVE_SOCKADDR_UN 1
287#define APR_HAVE_MEMMEM 1
288#define APR_HAVE_MEMMOVE 1
289#define APR_HAVE_SETRLIMIT 1
290#define APR_HAVE_SIGACTION 1
291#define APR_HAVE_SIGSUSPEND 1
292#define APR_HAVE_SIGWAIT 1
293#define APR_HAVE_SA_STORAGE 1
294#define APR_HAVE_STRCASECMP 1
295#define APR_HAVE_STRDUP 1
296#define APR_HAVE_STRICMP 0
297#define APR_HAVE_STRNCASECMP 1
298#define APR_HAVE_STRNICMP 0
299#define APR_HAVE_STRSTR 1
300#define APR_HAVE_MEMCHR 1
301#define APR_HAVE_STRUCT_RLIMIT 1
302#define APR_HAVE_UNION_SEMUN 0
303#define APR_HAVE_SCTP 1
304#define APR_HAVE_IOVEC 1
305
306/* APR Feature Macros */
307#define APR_HAS_SHARED_MEMORY 1
308#define APR_HAS_THREADS 1
309#define APR_HAS_SENDFILE 1
310#define APR_HAS_MMAP 1
311#define APR_HAS_FORK 1
312#define APR_HAS_RANDOM 1
313#define APR_HAS_OTHER_CHILD 1
314#define APR_HAS_DSO 1
315#define APR_HAS_SO_ACCEPTFILTER 0
316#define APR_HAS_UNICODE_FS 0
317#define APR_HAS_PROC_INVOKED 0
318#define APR_HAS_USER 1
319#define APR_HAS_LARGE_FILES 0
320#define APR_HAS_XTHREAD_FILES 0
321#define APR_HAS_OS_UUID 1
322
323#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
324
325/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
326 * to poll on files/pipes.
327 */
328#define APR_FILES_AS_SOCKETS 1
329
330/* This macro indicates whether or not EBCDIC is the native character set.
331 */
332#define APR_CHARSET_EBCDIC 0
333
334/* If we have a TCP implementation that can be "corked", what flag
335 * do we use?
336 */
337#define APR_TCP_NOPUSH_FLAG TCP_CORK
338
339/* Is the TCP_NODELAY socket option inherited from listening sockets?
340*/
341#define APR_TCP_NODELAY_INHERITED 1
342
343/* Is the O_NONBLOCK flag inherited from listening sockets?
344*/
345#define APR_O_NONBLOCK_INHERITED 0
346
347/* Typedefs that APR needs. */
348
349typedef unsigned char apr_byte_t;
350
351typedef short apr_int16_t;
352typedef unsigned short apr_uint16_t;
353
354typedef int apr_int32_t;
355typedef unsigned int apr_uint32_t;
356
357#define APR_SIZEOF_VOIDP 8
358#define APR_SIZEOF_OFF_T 8
359
360/*
361 * Darwin 10's default compiler (gcc42) builds for both 64 and
362 * 32 bit architectures unless specifically told not to.
363 * In those cases, we need to override types depending on how
364 * we're being built at compile time.
365 * NOTE: This is an ugly work-around for Darwin's
366 * concept of universal binaries, a single package
367 * (executable, lib, etc...) which contains both 32
368 * and 64 bit versions. The issue is that if APR is
369 * built universally, if something else is compiled
370 * against it, some bit sizes will depend on whether
371 * it is 32 or 64 bit. This is determined by the __LP64__
372 * flag. Since we need to support both, we have to
373 * handle OS X unqiuely.
374 */
375#ifdef DARWIN_10
376#undef APR_SIZEOF_VOIDP
377#undef APR_INT64_C
378#undef APR_UINT64_C
379#ifdef __LP64__
380 typedef long apr_int64_t;
381 typedef unsigned long apr_uint64_t;
382 #define APR_SIZEOF_VOIDP 8
383 #define APR_INT64_C(v) (v ## L)
384 #define APR_UINT64_C(v) (v ## UL)
385#else
386 typedef long long apr_int64_t;
387 typedef unsigned long long apr_uint64_t;
388 #define APR_SIZEOF_VOIDP 4
389 #define APR_INT64_C(v) (v ## LL)
390 #define APR_UINT64_C(v) (v ## ULL)
391#endif
392#else
393 typedef int64_t apr_int64_t;
394 typedef uint64_t apr_uint64_t;
395
396 /* Mechanisms to properly type numeric literals */
397 #define APR_INT64_C(val) INT64_C(val)
398 #define APR_UINT64_C(val) UINT64_C(val)
399#endif
400
401typedef size_t apr_size_t;
402typedef ssize_t apr_ssize_t;
403typedef off_t apr_off_t;
404typedef socklen_t apr_socklen_t;
405typedef ino_t apr_ino_t;
406
407#if APR_SIZEOF_VOIDP == 8
408typedef apr_uint64_t apr_uintptr_t;
409typedef apr_int64_t apr_intptr_t;
410#else
411typedef apr_uint32_t apr_uintptr_t;
412typedef apr_int32_t apr_intptr_t;
413#endif
414
415/* Are we big endian? */
416#define APR_IS_BIGENDIAN 0
417
418#ifdef INT16_MIN
419#define APR_INT16_MIN INT16_MIN
420#else
421#define APR_INT16_MIN (-0x7fff - 1)
422#endif
423
424#ifdef INT16_MAX
425#define APR_INT16_MAX INT16_MAX
426#else
427#define APR_INT16_MAX (0x7fff)
428#endif
429
430#ifdef UINT16_MAX
431#define APR_UINT16_MAX UINT16_MAX
432#else
433#define APR_UINT16_MAX (0xffff)
434#endif
435
436#ifdef INT32_MIN
437#define APR_INT32_MIN INT32_MIN
438#else
439#define APR_INT32_MIN (-0x7fffffff - 1)
440#endif
441
442#ifdef INT32_MAX
443#define APR_INT32_MAX INT32_MAX
444#else
445#define APR_INT32_MAX 0x7fffffff
446#endif
447
448#ifdef UINT32_MAX
449#define APR_UINT32_MAX UINT32_MAX
450#else
451#define APR_UINT32_MAX (0xffffffffU)
452#endif
453
454#ifdef INT64_MIN
455#define APR_INT64_MIN INT64_MIN
456#else
457#define APR_INT64_MIN (APR_INT64_C(-0x7fffffffffffffff) - 1)
458#endif
459
460#ifdef INT64_MAX
461#define APR_INT64_MAX INT64_MAX
462#else
463#define APR_INT64_MAX APR_INT64_C(0x7fffffffffffffff)
464#endif
465
466#ifdef UINT64_MAX
467#define APR_UINT64_MAX UINT64_MAX
468#else
469#define APR_UINT64_MAX APR_UINT64_C(0xffffffffffffffff)
470#endif
471
472#define APR_SIZE_MAX (~((apr_size_t)0))
473#define APR_OFF_MAX (sizeof(apr_off_t) == 4 ? APR_INT32_MAX : sizeof(apr_off_t) == 8 ? APR_INT64_MAX :0)
474
475
476/* Definitions that APR programs need to work properly. */
477
478/**
479 * APR public API wrap for C++ compilers.
480 */
481#ifdef __cplusplus
482#define APR_BEGIN_DECLS extern "C" {
483#define APR_END_DECLS }
484#else
485#define APR_BEGIN_DECLS
486#define APR_END_DECLS
487#endif
488
489/**
490 * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
491 * so that they follow the platform's calling convention.
492 * <PRE>
493 *
494 * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
495 *
496 * </PRE>
497 */
498#define APR_THREAD_FUNC
499
500#if defined(DOXYGEN) || !defined(WIN32)
501
502/**
503 * The public APR functions are declared with APR_DECLARE(), so they may
504 * use the most appropriate calling convention. Public APR functions with
505 * variable arguments must use APR_DECLARE_NONSTD().
506 *
507 * @remark Both the declaration and implementations must use the same macro.
508 *
509 * <PRE>
510 * APR_DECLARE(rettype) apr_func(args)
511 * </PRE>
512 * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
513 * @remark Note that when APR compiles the library itself, it passes the
514 * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
515 * to export public symbols from the dynamic library build.\n
516 * The user must define the APR_DECLARE_STATIC when compiling to target
517 * the static APR library on some platforms (e.g. Win32.) The public symbols
518 * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
519 * By default, compiling an application and including the APR public
520 * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
521 * linked to the dynamic library.
522 */
523#define APR_DECLARE(type) type
524
525/**
526 * The public APR functions using variable arguments are declared with
527 * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
528 * @see APR_DECLARE @see APR_DECLARE_DATA
529 * @remark Both the declaration and implementations must use the same macro.
530 * <PRE>
531 *
532 * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
533 *
534 * </PRE>
535 */
536#define APR_DECLARE_NONSTD(type) type
537
538/**
539 * The public APR variables are declared with APR_DECLARE_DATA.
540 * This assures the appropriate indirection is invoked at compile time.
541 * @see APR_DECLARE @see APR_DECLARE_NONSTD
542 * @remark Note that the declaration and implementations use different forms,
543 * but both must include the macro.
544 *
545 * <PRE>
546 *
547 * extern APR_DECLARE_DATA type apr_variable;\n
548 * APR_DECLARE_DATA type apr_variable = value;
549 *
550 * </PRE>
551 */
552#define APR_DECLARE_DATA
553
554#elif defined(APR_DECLARE_STATIC)
555#define APR_DECLARE(type) type __stdcall
556#define APR_DECLARE_NONSTD(type) type __cdecl
557#define APR_DECLARE_DATA
558#elif defined(APR_DECLARE_EXPORT)
559#define APR_DECLARE(type) __declspec(dllexport) type __stdcall
560#define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
561#define APR_DECLARE_DATA __declspec(dllexport)
562#else
563#define APR_DECLARE(type) __declspec(dllimport) type __stdcall
564#define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
565#define APR_DECLARE_DATA __declspec(dllimport)
566#endif
567
568#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)
569/**
570 * Declare a dso module's exported module structure as APR_MODULE_DECLARE_DATA.
571 *
572 * Unless APR_MODULE_DECLARE_STATIC is defined at compile time, symbols
573 * declared with APR_MODULE_DECLARE_DATA are always exported.
574 * @code
575 * module APR_MODULE_DECLARE_DATA mod_tag
576 * @endcode
577 */
578#define APR_MODULE_DECLARE_DATA
579#else
580#define APR_MODULE_DECLARE_DATA __declspec(dllexport)
581#endif
582
583/**
584 * @deprecated
585 * @see APR_MODULE_DECLARE_DATA
586 */
587#define APU_MODULE_DECLARE_DATA APR_MODULE_DECLARE_DATA
588
589/* Define APR_SSIZE_T_FMT.
590 * If ssize_t is an integer we define it to be "d",
591 * if ssize_t is a long int we define it to be "ld",
592 * if ssize_t is neither we declare an error here.
593 * I looked for a better way to define this here, but couldn't find one, so
594 * to find the logic for this definition search for "ssize_t_fmt" in
595 * configure.in.
596 */
597
598#define APR_SSIZE_T_FMT "ld"
599
600/* And APR_SIZE_T_FMT */
601#define APR_SIZE_T_FMT "lu"
602
603/* And APR_OFF_T_FMT */
604#define APR_OFF_T_FMT "ld"
605
606/* And APR_PID_T_FMT */
607#define APR_PID_T_FMT "d"
608
609/* And APR_INT64_T_FMT */
610#define APR_INT64_T_FMT PRId64
611
612/* And APR_UINT64_T_FMT */
613#define APR_UINT64_T_FMT PRIu64
614
615/* And APR_UINT64_T_HEX_FMT */
616#define APR_UINT64_T_HEX_FMT PRIx64
617
618/*
619 * Ensure we work with universal binaries on Darwin
620 */
621#ifdef DARWIN_10
622
623#undef APR_HAS_LARGE_FILES
624#undef APR_SIZEOF_VOIDP
625#undef APR_INT64_T_FMT
626#undef APR_UINT64_T_FMT
627#undef APR_UINT64_T_HEX_FMT
628
629#ifdef __LP64__
630 #define APR_HAS_LARGE_FILES 0
631 #define APR_SIZEOF_VOIDP 8
632 #define APR_INT64_T_FMT "ld"
633 #define APR_UINT64_T_FMT "lu"
634 #define APR_UINT64_T_HEX_FMT "lx"
635#else
636 #define APR_HAS_LARGE_FILES 1
637 #define APR_SIZEOF_VOIDP 4
638 #define APR_INT64_T_FMT "lld"
639 #define APR_UINT64_T_FMT "llu"
640 #define APR_UINT64_T_HEX_FMT "llx"
641#endif
642
643#undef APR_IS_BIGENDIAN
644#ifdef __BIG_ENDIAN__
645 #define APR_IS_BIGENDIAN 1
646#else
647 #define APR_IS_BIGENDIAN 0
648#endif
649
650#undef APR_OFF_T_FMT
651#define APR_OFF_T_FMT "lld"
652
653#endif /* DARWIN_10 */
654
655/* Does the proc mutex lock threads too */
656#ifdef WIN32
657#define APR_PROC_MUTEX_IS_GLOBAL 1
658#else
659#define APR_PROC_MUTEX_IS_GLOBAL 0
660#endif
661
662/* Local machine definition for console and log output. */
663#define APR_EOL_STR "\n"
664
665#if APR_HAVE_SYS_WAIT_H
666#ifdef WEXITSTATUS
667#define apr_wait_t int
668#else
669#define apr_wait_t union wait
670#define WEXITSTATUS(status) (int)((status).w_retcode)
671#define WTERMSIG(status) (int)((status).w_termsig)
672#endif /* !WEXITSTATUS */
673#elif defined(__MINGW32__)
674typedef int apr_wait_t;
675#endif /* HAVE_SYS_WAIT_H */
676
677#if defined(PATH_MAX)
678#define APR_PATH_MAX PATH_MAX
679#elif defined(_POSIX_PATH_MAX)
680#define APR_PATH_MAX _POSIX_PATH_MAX
681#else
682#error no decision has been made on APR_PATH_MAX for your platform
683#endif
684
685#define APR_DSOPATH "LD_LIBRARY_PATH"
686
687/** @} */
688
689/*
690 * we always have SDBM (it's in our codebase)
691 */
692#define APU_HAVE_SDBM 1
693#define APU_HAVE_LMDB 0
694#define APU_HAVE_GDBM 0
695#define APU_HAVE_NDBM 0
696#define APU_HAVE_DB 0
697
698#if APU_HAVE_DB
699#define APU_HAVE_DB_VERSION 0
700#endif
701
702#define APU_HAVE_PGSQL 0
703#define APU_HAVE_MYSQL 0
704#define APU_HAVE_SQLITE3 1
705#define APU_HAVE_SQLITE2 0
706#define APU_HAVE_ORACLE 0
707#define APU_HAVE_ODBC 0
708
709#define APU_HAVE_CRYPTO 0
710#define APU_HAVE_CRYPTO_PRNG 0
711#define APU_HAVE_OPENSSL 0
712#define APU_HAVE_NSS 0
713#define APU_HAVE_COMMONCRYPTO 0
714
715#define APR_HAS_LDAP @apu_have_ldap@
716#define APR_HAS_OPENLDAP_LDAPSDK @apu_have_ldap_openldap@
717#define APR_HAS_MICROSOFT_LDAPSDK @apu_have_ldap_microsoft@
718#define APR_HAS_TIVOLI_LDAPSDK @apu_have_ldap_tivoli@
719#define APR_HAS_ZOS_LDAPSDK @apu_have_ldap_zos@
720#define APR_HAS_OTHER_LDAPSDK @apu_have_ldap_other@
721
722#define APU_HAVE_ICONV 1
723#define APR_HAS_XLATE (APU_HAVE_ICONV)
724
725#define APU_USE_EXPAT 1
726#define APU_USE_LIBXML2 0
727
728/* Definitions that only Win32 programs need to compile properly. */
729
730/* XXX These simply don't belong here, perhaps in apr_portable.h
731 * based on some APR_HAVE_PID/GID/UID?
732 */
733#ifdef WIN32
734#ifndef __GNUC__
735typedef int pid_t;
736#endif
737typedef int uid_t;
738typedef int gid_t;
739#endif
740
741#ifdef __cplusplus
742}
743#endif
744
745#endif /* APR_H */