Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

apr.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation 00002 * 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 */ 00015 00016 00017 #ifndef APR_H 00018 #define APR_H 00019 00020 /* GENERATED FILE WARNING! DO NOT EDIT apr.h 00021 * 00022 * You must modify apr.h.in instead. 00023 * 00024 * And please, make an effort to stub apr.hw and apr.hnw in the process. 00025 */ 00026 00027 /** 00028 * @file apr.h 00029 * @brief APR Platform Definitions 00030 * @remark This is a generated header generated from include/apr.h.in by 00031 * ./configure, or copied from include/apr.hw or include/apr.hnw 00032 * for Win32 or Netware by those build environments, respectively. 00033 */ 00034 00035 /** 00036 * @defgroup APR Apache Portability Runtime library 00037 * @{ 00038 */ 00039 /** 00040 * @defgroup apr_platform Platform Definitions 00041 * @{ 00042 */ 00043 00044 /* So that we can use inline on some critical functions, and use 00045 * GNUC attributes (such as to get -Wall warnings for printf-like 00046 * functions). Only do this in gcc 2.7 or later ... it may work 00047 * on earlier stuff, but why chance it. 00048 * 00049 * We've since discovered that the gcc shipped with NeXT systems 00050 * as "cc" is completely broken. It claims to be __GNUC__ and so 00051 * on, but it doesn't implement half of the things that __GNUC__ 00052 * means. In particular it's missing inline and the __attribute__ 00053 * stuff. So we hack around it. PR#1613. -djg 00054 */ 00055 #if !defined(__GNUC__) || __GNUC__ < 2 || \ 00056 (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\ 00057 defined(NEXT) 00058 #ifndef __attribute__ 00059 #define __attribute__(__x) 00060 #endif 00061 #define APR_INLINE 00062 #define APR_HAS_INLINE 0 00063 #else 00064 #define APR_INLINE __inline__ 00065 #define APR_HAS_INLINE 1 00066 #endif 00067 00068 #define APR_HAVE_ARPA_INET_H 1 00069 #define APR_HAVE_CONIO_H 0 00070 #define APR_HAVE_CRYPT_H 1 00071 #define APR_HAVE_CTYPE_H 1 00072 #define APR_HAVE_DIRENT_H 1 00073 #define APR_HAVE_ERRNO_H 1 00074 #define APR_HAVE_FCNTL_H 1 00075 #define APR_HAVE_IO_H 0 00076 #define APR_HAVE_LIMITS_H 1 00077 #define APR_HAVE_NETDB_H 1 00078 #define APR_HAVE_NETINET_IN_H 1 00079 #define APR_HAVE_NETINET_SCTP_H 0 00080 #define APR_HAVE_NETINET_SCTP_UIO_H 0 00081 #define APR_HAVE_NETINET_TCP_H 1 00082 #define APR_HAVE_PTHREAD_H 1 00083 #define APR_HAVE_SEMAPHORE_H 1 00084 #define APR_HAVE_SIGNAL_H 1 00085 #define APR_HAVE_STDARG_H 1 00086 #define APR_HAVE_STDINT_H 1 00087 #define APR_HAVE_STDIO_H 1 00088 #define APR_HAVE_STDLIB_H 1 00089 #define APR_HAVE_STRING_H 1 00090 #define APR_HAVE_STRINGS_H 1 00091 #define APR_HAVE_SYS_IOCTL_H 1 00092 #define APR_HAVE_SYS_SENDFILE_H 1 00093 #define APR_HAVE_SYS_SIGNAL_H 1 00094 #define APR_HAVE_SYS_SOCKET_H 1 00095 #define APR_HAVE_SYS_SOCKIO_H 0 00096 #define APR_HAVE_SYS_SYSLIMITS_H 0 00097 #define APR_HAVE_SYS_TIME_H 1 00098 #define APR_HAVE_SYS_TYPES_H 1 00099 #define APR_HAVE_SYS_UIO_H 1 00100 #define APR_HAVE_SYS_UN_H 1 00101 #define APR_HAVE_SYS_WAIT_H 1 00102 #define APR_HAVE_TIME_H 1 00103 #define APR_HAVE_UNISTD_H 1 00104 00105 /** @} */ 00106 00107 /* We don't include our conditional headers within the doxyblocks 00108 * or the extern "C" namespace 00109 */ 00110 00111 #if APR_HAVE_SYS_TYPES_H 00112 #include <sys/types.h> 00113 #endif 00114 00115 #if APR_HAVE_SYS_SOCKET_H 00116 #include <sys/socket.h> 00117 #endif 00118 00119 #if APR_HAVE_STDINT_H 00120 #include <stdint.h> 00121 #endif 00122 00123 #if APR_HAVE_SYS_WAIT_H 00124 #include <sys/wait.h> 00125 #endif 00126 00127 #ifdef OS2 00128 #define INCL_DOS 00129 #define INCL_DOSERRORS 00130 #include <os2.h> 00131 #endif 00132 00133 /* header files for PATH_MAX, _POSIX_PATH_MAX */ 00134 #if APR_HAVE_LIMITS_H 00135 #include <limits.h> 00136 #else 00137 #if APR_HAVE_SYS_SYSLIMITS_H 00138 #include <sys/syslimits.h> 00139 #endif 00140 #endif 00141 00142 00143 #ifdef __cplusplus 00144 extern "C" { 00145 #endif 00146 00147 /** 00148 * @addtogroup apr_platform 00149 * @ingroup APR 00150 * @{ 00151 */ 00152 00153 #define APR_HAVE_SHMEM_MMAP_TMP 1 00154 #define APR_HAVE_SHMEM_MMAP_SHM 1 00155 #define APR_HAVE_SHMEM_MMAP_ZERO 1 00156 #define APR_HAVE_SHMEM_SHMGET_ANON 1 00157 #define APR_HAVE_SHMEM_SHMGET 1 00158 #define APR_HAVE_SHMEM_MMAP_ANON 1 00159 #define APR_HAVE_SHMEM_BEOS 0 00160 00161 #define APR_USE_SHMEM_MMAP_TMP 0 00162 #define APR_USE_SHMEM_MMAP_SHM 0 00163 #define APR_USE_SHMEM_MMAP_ZERO 0 00164 #define APR_USE_SHMEM_SHMGET_ANON 0 00165 #define APR_USE_SHMEM_SHMGET 1 00166 #define APR_USE_SHMEM_MMAP_ANON 1 00167 #define APR_USE_SHMEM_BEOS 0 00168 00169 #define APR_USE_FLOCK_SERIALIZE 0 00170 #define APR_USE_SYSVSEM_SERIALIZE 0 00171 #define APR_USE_POSIXSEM_SERIALIZE 0 00172 #define APR_USE_FCNTL_SERIALIZE 1 00173 #define APR_USE_PROC_PTHREAD_SERIALIZE 0 00174 #define APR_USE_PTHREAD_SERIALIZE 1 00175 00176 #define APR_HAS_FLOCK_SERIALIZE 1 00177 #define APR_HAS_SYSVSEM_SERIALIZE 1 00178 #define APR_HAS_POSIXSEM_SERIALIZE 0 00179 #define APR_HAS_FCNTL_SERIALIZE 1 00180 #define APR_HAS_PROC_PTHREAD_SERIALIZE 1 00181 00182 #define APR_PROCESS_LOCK_IS_GLOBAL 0 00183 00184 #define APR_HAVE_CORKABLE_TCP 1 00185 #define APR_HAVE_GETRLIMIT 1 00186 #define APR_HAVE_IN_ADDR 1 00187 #define APR_HAVE_INET_ADDR 1 00188 #define APR_HAVE_INET_NETWORK 1 00189 #define APR_HAVE_IPV6 1 00190 #define APR_HAVE_MEMMOVE 1 00191 #define APR_HAVE_SETRLIMIT 1 00192 #define APR_HAVE_SIGACTION 1 00193 #define APR_HAVE_SIGSUSPEND 1 00194 #define APR_HAVE_SIGWAIT 1 00195 #define APR_HAVE_SA_STORAGE 1 00196 #define APR_HAVE_STRCASECMP 1 00197 #define APR_HAVE_STRDUP 1 00198 #define APR_HAVE_STRICMP 0 00199 #define APR_HAVE_STRNCASECMP 1 00200 #define APR_HAVE_STRNICMP 0 00201 #define APR_HAVE_STRSTR 1 00202 #define APR_HAVE_MEMCHR 1 00203 #define APR_HAVE_STRUCT_RLIMIT 1 00204 #define APR_HAVE_UNION_SEMUN 0 00205 #define APR_HAVE_SCTP 0 00206 00207 /* APR Feature Macros */ 00208 #define APR_HAS_SHARED_MEMORY 1 00209 #define APR_HAS_THREADS 1 00210 #define APR_HAS_SENDFILE 1 00211 #define APR_HAS_MMAP 1 00212 #define APR_HAS_FORK 1 00213 #define APR_HAS_RANDOM 1 00214 #define APR_HAS_OTHER_CHILD 1 00215 #define APR_HAS_DSO 1 00216 #define APR_HAS_SO_ACCEPTFILTER 0 00217 #define APR_HAS_UNICODE_FS 0 00218 #define APR_HAS_PROC_INVOKED 0 00219 #define APR_HAS_USER 1 00220 #define APR_HAS_LARGE_FILES 1 00221 #define APR_HAS_XTHREAD_FILES 0 00222 #define APR_HAS_OS_UUID 0 00223 00224 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible 00225 * to poll on files/pipes. 00226 */ 00227 #define APR_FILES_AS_SOCKETS 1 00228 00229 /* This macro indicates whether or not EBCDIC is the native character set. 00230 */ 00231 #define APR_CHARSET_EBCDIC 0 00232 00233 /* If we have a TCP implementation that can be "corked", what flag 00234 * do we use? 00235 */ 00236 #define APR_TCP_NOPUSH_FLAG TCP_CORK 00237 00238 /* Is the TCP_NODELAY socket option inherited from listening sockets? 00239 */ 00240 #define APR_TCP_NODELAY_INHERITED 1 00241 00242 /* Is the O_NONBLOCK flag inherited from listening sockets? 00243 */ 00244 #define APR_O_NONBLOCK_INHERITED 0 00245 00246 /* Typedefs that APR needs. */ 00247 00248 typedef unsigned char apr_byte_t; 00249 00250 typedef short apr_int16_t; 00251 typedef unsigned short apr_uint16_t; 00252 00253 typedef int apr_int32_t; 00254 typedef unsigned int apr_uint32_t; 00255 00256 typedef long long apr_int64_t; 00257 typedef unsigned long long apr_uint64_t; 00258 00259 typedef size_t apr_size_t; 00260 typedef ssize_t apr_ssize_t; 00261 typedef off64_t apr_off_t; 00262 typedef socklen_t apr_socklen_t; 00263 00264 #define APR_SIZEOF_VOIDP 4 00265 00266 /* Are we big endian? */ 00267 #define APR_IS_BIGENDIAN 0 00268 00269 /* Mechanisms to properly type numeric literals */ 00270 #define APR_INT64_C(val) INT64_C(val) 00271 #define APR_UINT64_C(val) UINT64_C(val) 00272 00273 /* Definitions that APR programs need to work properly. */ 00274 00275 /** 00276 * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, 00277 * so that they follow the platform's calling convention. 00278 * @example 00279 */ 00280 /** void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data); 00281 */ 00282 #define APR_THREAD_FUNC 00283 00284 /** 00285 * The public APR functions are declared with APR_DECLARE(), so they may 00286 * use the most appropriate calling convention. Public APR functions with 00287 * variable arguments must use APR_DECLARE_NONSTD(). 00288 * 00289 * @remark Both the declaration and implementations must use the same macro. 00290 * @example 00291 */ 00292 /** APR_DECLARE(rettype) apr_func(args) 00293 * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA 00294 * @remark Note that when APR compiles the library itself, it passes the 00295 * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) 00296 * to export public symbols from the dynamic library build.\n 00297 * The user must define the APR_DECLARE_STATIC when compiling to target 00298 * the static APR library on some platforms (e.g. Win32.) The public symbols 00299 * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n 00300 * By default, compiling an application and including the APR public 00301 * headers, without defining APR_DECLARE_STATIC, will prepare the code to be 00302 * linked to the dynamic library. 00303 */ 00304 #define APR_DECLARE(type) type 00305 00306 /** 00307 * The public APR functions using variable arguments are declared with 00308 * APR_DECLARE_NONSTD(), as they must follow the C language calling convention. 00309 * @see APR_DECLARE @see APR_DECLARE_DATA 00310 * @remark Both the declaration and implementations must use the same macro. 00311 * @example 00312 */ 00313 /** APR_DECLARE_NONSTD(rettype) apr_func(args, ...); 00314 */ 00315 #define APR_DECLARE_NONSTD(type) type 00316 00317 /** 00318 * The public APR variables are declared with AP_MODULE_DECLARE_DATA. 00319 * This assures the appropriate indirection is invoked at compile time. 00320 * @see APR_DECLARE @see APR_DECLARE_NONSTD 00321 * @remark Note that the declaration and implementations use different forms, 00322 * but both must include the macro. 00323 * @example 00324 */ 00325 /** extern APR_DECLARE_DATA type apr_variable;\n 00326 * APR_DECLARE_DATA type apr_variable = value; 00327 */ 00328 #define APR_DECLARE_DATA 00329 00330 /* Define APR_SSIZE_T_FMT. 00331 * If ssize_t is an integer we define it to be "d", 00332 * if ssize_t is a long int we define it to be "ld", 00333 * if ssize_t is neither we declare an error here. 00334 * I looked for a better way to define this here, but couldn't find one, so 00335 * to find the logic for this definition search for "ssize_t_fmt" in 00336 * configure.in. 00337 */ 00338 #define APR_SSIZE_T_FMT "d" 00339 00340 /* And APR_SIZE_T_FMT */ 00341 #define APR_SIZE_T_FMT "d" 00342 00343 /* And APR_OFF_T_FMT */ 00344 #define APR_OFF_T_FMT APR_INT64_T_FMT 00345 00346 /* And APR_PID_T_FMT */ 00347 #define APR_PID_T_FMT "d" 00348 00349 /* And APR_INT64_T_FMT */ 00350 #define APR_INT64_T_FMT "lld" 00351 00352 /* And APR_UINT64_T_FMT */ 00353 #define APR_UINT64_T_FMT "llu" 00354 00355 /* And APR_UINT64_T_HEX_FMT */ 00356 #define APR_UINT64_T_HEX_FMT "llx" 00357 00358 /* Does the proc mutex lock threads too */ 00359 #define APR_PROC_MUTEX_IS_GLOBAL 0 00360 00361 /* Local machine definition for console and log output. */ 00362 #define APR_EOL_STR "\n" 00363 00364 00365 #if APR_HAVE_SYS_WAIT_H 00366 #ifdef WEXITSTATUS 00367 #define apr_wait_t int 00368 #else 00369 #define apr_wait_t union wait 00370 #define WEXITSTATUS(status) (int)((status).w_retcode) 00371 #define WTERMSIG(status) (int)((status).w_termsig) 00372 #endif /* !WEXITSTATUS */ 00373 #endif /* HAVE_SYS_WAIT_H */ 00374 00375 #if defined(PATH_MAX) 00376 #define APR_PATH_MAX PATH_MAX 00377 #elif defined(_POSIX_PATH_MAX) 00378 #define APR_PATH_MAX _POSIX_PATH_MAX 00379 #else 00380 #error no decision has been made on APR_PATH_MAX for your platform 00381 #endif 00382 00383 /** @} */ 00384 00385 #ifdef __cplusplus 00386 } 00387 #endif 00388 00389 #endif /* APR_H */

Generated on Thu Sep 16 13:47:09 2004 for Apache Portable Runtime by doxygen 1.3.7