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