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