apr.h (302408) | apr.h (362181) |
---|---|
1/* $FreeBSD: stable/11/usr.bin/svn/lib/libapr/apr.h 286503 2015-08-09 05:14:25Z peter $ */ | 1/* $FreeBSD: stable/11/usr.bin/svn/lib/libapr/apr.h 362181 2020-06-14 18:49:06Z 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 * --- 80 unchanged lines hidden (view full) --- 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 | 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 * --- 80 unchanged lines hidden (view full) --- 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 |
|
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 --- 59 unchanged lines hidden (view full) --- 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 | 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 --- 59 unchanged lines hidden (view full) --- 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 |
173#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) | 174#if APR_HAVE_STDINT_H 175#ifdef __cplusplus |
174/* C99 7.18.4 requires that stdint.h only exposes INT64_C 175 * and UINT64_C for C++ implementations if this is defined: */ | 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 |
|
176#define __STDC_CONSTANT_MACROS 177#endif | 179#define __STDC_CONSTANT_MACROS 180#endif |
178 179#if APR_HAVE_STDINT_H | 181/* C++ needs this too for PRI*NN formats: */ 182#ifndef __STDC_FORMAT_MACROS 183#define __STDC_FORMAT_MACROS 184#endif 185#endif /* __cplusplus */ |
180#include <stdint.h> 181#endif 182 | 186#include <stdint.h> 187#endif 188 |
189#if APR_HAVE_INTTYPES_H 190#include <inttypes.h> 191#endif 192 |
|
183#if APR_HAVE_SYS_WAIT_H 184#include <sys/wait.h> 185#endif 186 187#ifdef OS2 188#define INCL_DOS 189#define INCL_DOSERRORS 190#include <os2.h> 191#endif 192 193/* header files for PATH_MAX, _POSIX_PATH_MAX */ 194#if APR_HAVE_LIMITS_H 195#include <limits.h> 196#else 197#if APR_HAVE_SYS_SYSLIMITS_H 198#include <sys/syslimits.h> 199#endif 200#endif 201 | 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__ */ |
|
202 203#ifdef __cplusplus 204extern "C" { 205#endif 206 207/** 208 * @addtogroup apr_platform 209 * @ingroup APR --- 4 unchanged lines hidden (view full) --- 214#define APR_HAVE_SHMEM_MMAP_SHM 1 215#define APR_HAVE_SHMEM_MMAP_ZERO 1 216#define APR_HAVE_SHMEM_SHMGET_ANON 1 217#define APR_HAVE_SHMEM_SHMGET 1 218#define APR_HAVE_SHMEM_MMAP_ANON 1 219#define APR_HAVE_SHMEM_BEOS 0 220 221#define APR_USE_SHMEM_MMAP_TMP 0 | 219 220#ifdef __cplusplus 221extern "C" { 222#endif 223 224/** 225 * @addtogroup apr_platform 226 * @ingroup APR --- 4 unchanged lines hidden (view full) --- 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 |
222#define APR_USE_SHMEM_MMAP_SHM 1 | 239#define APR_USE_SHMEM_MMAP_SHM 0 |
223#define APR_USE_SHMEM_MMAP_ZERO 0 224#define APR_USE_SHMEM_SHMGET_ANON 0 | 240#define APR_USE_SHMEM_MMAP_ZERO 0 241#define APR_USE_SHMEM_SHMGET_ANON 0 |
225#define APR_USE_SHMEM_SHMGET 0 | 242#define APR_USE_SHMEM_SHMGET 1 |
226#define APR_USE_SHMEM_MMAP_ANON 1 227#define APR_USE_SHMEM_BEOS 0 228 229#define APR_USE_FLOCK_SERIALIZE 1 230#define APR_USE_SYSVSEM_SERIALIZE 0 231#define APR_USE_POSIXSEM_SERIALIZE 0 232#define APR_USE_FCNTL_SERIALIZE 0 233#define APR_USE_PROC_PTHREAD_SERIALIZE 0 234#define APR_USE_PTHREAD_SERIALIZE 1 235 236#define APR_HAS_FLOCK_SERIALIZE 1 237#define APR_HAS_SYSVSEM_SERIALIZE 1 238#define APR_HAS_POSIXSEM_SERIALIZE 1 239#define APR_HAS_FCNTL_SERIALIZE 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 |
240#define APR_HAS_PROC_PTHREAD_SERIALIZE 0 | 257#define APR_HAS_PROC_PTHREAD_SERIALIZE 1 |
241 242#define APR_PROCESS_LOCK_IS_GLOBAL 0 243 244#define APR_HAVE_CORKABLE_TCP 1 245#define APR_HAVE_GETRLIMIT 1 246#define APR_HAVE_IN_ADDR 1 247#define APR_HAVE_INET_ADDR 1 248#define APR_HAVE_INET_NETWORK 1 249#define APR_HAVE_IPV6 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 |
|
250#define APR_HAVE_MEMMOVE 1 251#define APR_HAVE_SETRLIMIT 1 252#define APR_HAVE_SIGACTION 1 253#define APR_HAVE_SIGSUSPEND 1 254#define APR_HAVE_SIGWAIT 1 255#define APR_HAVE_SA_STORAGE 1 256#define APR_HAVE_STRCASECMP 1 257#define APR_HAVE_STRDUP 1 --- 10 unchanged lines hidden (view full) --- 268/* APR Feature Macros */ 269#define APR_HAS_SHARED_MEMORY 1 270#define APR_HAS_THREADS 1 271#define APR_HAS_SENDFILE 1 272#define APR_HAS_MMAP 1 273#define APR_HAS_FORK 1 274#define APR_HAS_RANDOM 1 275#define APR_HAS_OTHER_CHILD 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 --- 10 unchanged lines hidden (view full) --- 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 |
276#define APR_HAS_DSO 0 | 294#define APR_HAS_DSO 1 |
277#define APR_HAS_SO_ACCEPTFILTER 1 278#define APR_HAS_UNICODE_FS 0 279#define APR_HAS_PROC_INVOKED 0 280#define APR_HAS_USER 1 281#define APR_HAS_LARGE_FILES 0 282#define APR_HAS_XTHREAD_FILES 0 283#define APR_HAS_OS_UUID 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 |
|
284 285#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0 286 287/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible 288 * to poll on files/pipes. 289 */ 290#define APR_FILES_AS_SOCKETS 1 291 --- 43 unchanged lines hidden (view full) --- 335 * built universally, if something else is compiled 336 * against it, some bit sizes will depend on whether 337 * it is 32 or 64 bit. This is determined by the __LP64__ 338 * flag. Since we need to support both, we have to 339 * handle OS X unqiuely. 340 */ 341#ifdef DARWIN_10 342#undef APR_SIZEOF_VOIDP | 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 --- 43 unchanged lines hidden (view full) --- 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 |
343#undef INT64_C 344#undef UINT64_C | 362#undef APR_INT64_C 363#undef APR_UINT64_C |
345#ifdef __LP64__ 346 typedef long apr_int64_t; 347 typedef unsigned long apr_uint64_t; 348 #define APR_SIZEOF_VOIDP 8 | 364#ifdef __LP64__ 365 typedef long apr_int64_t; 366 typedef unsigned long apr_uint64_t; 367 #define APR_SIZEOF_VOIDP 8 |
349 #define INT64_C(v) (v ## L) 350 #define UINT64_C(v) (v ## UL) | 368 #define APR_INT64_C(v) (v ## L) 369 #define APR_UINT64_C(v) (v ## UL) |
351#else 352 typedef long long apr_int64_t; 353 typedef unsigned long long apr_uint64_t; 354 #define APR_SIZEOF_VOIDP 4 | 370#else 371 typedef long long apr_int64_t; 372 typedef unsigned long long apr_uint64_t; 373 #define APR_SIZEOF_VOIDP 4 |
355 #define INT64_C(v) (v ## LL) 356 #define UINT64_C(v) (v ## ULL) | 374 #define APR_INT64_C(v) (v ## LL) 375 #define APR_UINT64_C(v) (v ## ULL) |
357#endif 358#else 359 typedef __int64_t apr_int64_t; 360 typedef __uint64_t apr_uint64_t; | 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) |
|
361#endif 362 363typedef size_t apr_size_t; 364typedef ssize_t apr_ssize_t; 365typedef off_t apr_off_t; 366typedef socklen_t apr_socklen_t; | 384#endif 385 386typedef size_t apr_size_t; 387typedef ssize_t apr_ssize_t; 388typedef off_t apr_off_t; 389typedef socklen_t apr_socklen_t; |
367typedef unsigned int apr_ino_t; | 390typedef __ino_t apr_ino_t; |
368 369#if APR_SIZEOF_VOIDP == 8 370typedef apr_uint64_t apr_uintptr_t; 371#else 372typedef apr_uint32_t apr_uintptr_t; 373#endif 374 375/* Are we big endian? */ 376#if _BYTE_ORDER == _LITTLE_ENDIAN 377#define APR_IS_BIGENDIAN 0 378#elif _BYTE_ORDER == _BIG_ENDIAN 379#define APR_IS_BIGENDIAN 1 380#else 381#error Unknown byte order. 382#endif 383 | 391 392#if APR_SIZEOF_VOIDP == 8 393typedef apr_uint64_t apr_uintptr_t; 394#else 395typedef 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 |
384/* Mechanisms to properly type numeric literals */ 385#define APR_INT64_C(val) INT64_C(val) 386#define APR_UINT64_C(val) UINT64_C(val) 387 | |
388#ifdef INT16_MIN 389#define APR_INT16_MIN INT16_MIN 390#else 391#define APR_INT16_MIN (-0x7fff - 1) 392#endif 393 394#ifdef INT16_MAX 395#define APR_INT16_MAX INT16_MAX --- 265 unchanged lines hidden --- | 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 --- 265 unchanged lines hidden --- |