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