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

apr.h

Go to the documentation of this file.
00001 /* ====================================================================
00002  * The Apache Software License, Version 1.1
00003  *
00004  * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
00005  * reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  *
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in
00016  *    the documentation and/or other materials provided with the
00017  *    distribution.
00018  *
00019  * 3. The end-user documentation included with the redistribution,
00020  *    if any, must include the following acknowledgment:
00021  *       "This product includes software developed by the
00022  *        Apache Software Foundation (http://www.apache.org/)."
00023  *    Alternately, this acknowledgment may appear in the software itself,
00024  *    if and wherever such third-party acknowledgments normally appear.
00025  *
00026  * 4. The names "Apache" and "Apache Software Foundation" must
00027  *    not be used to endorse or promote products derived from this
00028  *    software without prior written permission. For written
00029  *    permission, please contact apache@apache.org.
00030  *
00031  * 5. Products derived from this software may not be called "Apache",
00032  *    nor may "Apache" appear in their name, without prior written
00033  *    permission of the Apache Software Foundation.
00034  *
00035  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00036  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00037  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00038  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00039  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00040  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00041  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00042  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00043  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00044  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00045  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00046  * SUCH DAMAGE.
00047  * ====================================================================
00048  *
00049  * This software consists of voluntary contributions made by many
00050  * individuals on behalf of the Apache Software Foundation.  For more
00051  * information on the Apache Software Foundation, please see
00052  * <http://www.apache.org/>.
00053  */
00054 
00055 
00056 #ifndef APR_H
00057 #define APR_H
00058 
00059 /* GENERATED FILE WARNING!  DO NOT EDIT apr.h
00060  *
00061  * You must modify apr.h.in instead.
00062  *
00063  * And please, make an effort to stub apr.hw and apr.hnw in the process.
00064  */
00065 
00083 /* So that we can use inline on some critical functions, and use
00084  * GNUC attributes (such as to get -Wall warnings for printf-like
00085  * functions).  Only do this in gcc 2.7 or later ... it may work
00086  * on earlier stuff, but why chance it.
00087  *
00088  * We've since discovered that the gcc shipped with NeXT systems
00089  * as "cc" is completely broken.  It claims to be __GNUC__ and so
00090  * on, but it doesn't implement half of the things that __GNUC__
00091  * means.  In particular it's missing inline and the __attribute__
00092  * stuff.  So we hack around it.  PR#1613. -djg
00093  */
00094 #if !defined(__GNUC__) || __GNUC__ < 2 || \
00095     (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
00096     defined(NEXT)
00097 #ifndef __attribute__
00098 #define __attribute__(__x)
00099 #endif
00100 #define APR_INLINE
00101 #define APR_HAS_INLINE          0
00102 #else
00103 #define APR_INLINE __inline__
00104 #define APR_HAS_INLINE          1
00105 #endif
00106 
00107 #define APR_HAVE_ARPA_INET_H     1
00108 #define APR_HAVE_CONIO_H         0
00109 #define APR_HAVE_CRYPT_H         1
00110 #define APR_HAVE_CTYPE_H         1
00111 #define APR_HAVE_DIRENT_H        1
00112 #define APR_HAVE_ERRNO_H         1
00113 #define APR_HAVE_FCNTL_H         1
00114 #define APR_HAVE_IO_H            0
00115 #define APR_HAVE_LIMITS_H        1
00116 #define APR_HAVE_NETDB_H         1
00117 #define APR_HAVE_NETINET_IN_H    1
00118 #define APR_HAVE_NETINET_SCTP_H  0
00119 #define APR_HAVE_NETINET_SCTP_UIO_H 0
00120 #define APR_HAVE_NETINET_TCP_H   1
00121 #define APR_HAVE_PTHREAD_H       1
00122 #define APR_HAVE_SEMAPHORE_H     1
00123 #define APR_HAVE_SIGNAL_H        1
00124 #define APR_HAVE_STDARG_H        1
00125 #define APR_HAVE_STDINT_H        1
00126 #define APR_HAVE_STDIO_H         1
00127 #define APR_HAVE_STDLIB_H        1
00128 #define APR_HAVE_STRING_H        1
00129 #define APR_HAVE_STRINGS_H       1
00130 #define APR_HAVE_SYS_SENDFILE_H  1
00131 #define APR_HAVE_SYS_SIGNAL_H    1
00132 #define APR_HAVE_SYS_SOCKET_H    1
00133 #define APR_HAVE_SYS_SYSLIMITS_H 0
00134 #define APR_HAVE_SYS_TIME_H      1
00135 #define APR_HAVE_SYS_TYPES_H     1
00136 #define APR_HAVE_SYS_UIO_H       1
00137 #define APR_HAVE_SYS_UN_H        1
00138 #define APR_HAVE_SYS_WAIT_H      1
00139 #define APR_HAVE_TIME_H          1
00140 #define APR_HAVE_UNISTD_H        1
00141 
00144 /* We don't include our conditional headers within the doxyblocks 
00145  * or the extern "C" namespace 
00146  */
00147 
00148 #if APR_HAVE_SYS_TYPES_H
00149 #include <sys/types.h>
00150 #endif
00151 
00152 #if APR_HAVE_SYS_SOCKET_H
00153 #include <sys/socket.h>
00154 #endif
00155 
00156 #if APR_HAVE_STDINT_H
00157 #include <stdint.h>
00158 #endif
00159 
00160 #if APR_HAVE_SYS_WAIT_H
00161 #include <sys/wait.h>
00162 #endif
00163 
00164 #ifdef OS2
00165 #define INCL_DOS
00166 #define INCL_DOSERRORS
00167 #include <os2.h>
00168 #endif
00169 
00170 /* header files for PATH_MAX, _POSIX_PATH_MAX */
00171 #if APR_HAVE_LIMITS_H
00172 #include <limits.h>
00173 #else
00174 #if APR_HAVE_SYS_SYSLIMITS_H
00175 #include <sys/syslimits.h>
00176 #endif
00177 #endif
00178 
00179 
00180 #ifdef __cplusplus
00181 extern "C" {
00182 #endif
00183 
00190 #define APR_HAVE_SHMEM_MMAP_TMP     1
00191 #define APR_HAVE_SHMEM_MMAP_SHM     1
00192 #define APR_HAVE_SHMEM_MMAP_ZERO    1
00193 #define APR_HAVE_SHMEM_SHMGET_ANON  1
00194 #define APR_HAVE_SHMEM_SHMGET       1
00195 #define APR_HAVE_SHMEM_MMAP_ANON    1
00196 #define APR_HAVE_SHMEM_BEOS         0
00197 
00198 #define APR_USE_SHMEM_MMAP_TMP     0
00199 #define APR_USE_SHMEM_MMAP_SHM     0
00200 #define APR_USE_SHMEM_MMAP_ZERO    0
00201 #define APR_USE_SHMEM_SHMGET_ANON  0
00202 #define APR_USE_SHMEM_SHMGET       1
00203 #define APR_USE_SHMEM_MMAP_ANON    1
00204 #define APR_USE_SHMEM_BEOS         0
00205 
00206 #define APR_USE_FLOCK_SERIALIZE           0 
00207 #define APR_USE_SYSVSEM_SERIALIZE         1
00208 #define APR_USE_POSIXSEM_SERIALIZE        0
00209 #define APR_USE_FCNTL_SERIALIZE           0
00210 #define APR_USE_PROC_PTHREAD_SERIALIZE    0 
00211 #define APR_USE_PTHREAD_SERIALIZE         1 
00212 
00213 #define APR_HAS_FLOCK_SERIALIZE           1
00214 #define APR_HAS_SYSVSEM_SERIALIZE         1
00215 #define APR_HAS_POSIXSEM_SERIALIZE        1
00216 #define APR_HAS_FCNTL_SERIALIZE           1
00217 #define APR_HAS_PROC_PTHREAD_SERIALIZE    1
00218 #define APR_HAS_RWLOCK_SERIALIZE          1
00219 
00220 #define APR_PROCESS_LOCK_IS_GLOBAL        0
00221 
00222 #define APR_HAVE_CORKABLE_TCP   1 
00223 #define APR_HAVE_GETRLIMIT      1
00224 #define APR_HAVE_IN_ADDR        1
00225 #define APR_HAVE_INET_ADDR      1
00226 #define APR_HAVE_INET_NETWORK   1
00227 #define APR_HAVE_IPV6           1
00228 #define APR_HAVE_MEMMOVE        1
00229 #define APR_HAVE_SETRLIMIT      1
00230 #define APR_HAVE_SIGACTION      1
00231 #define APR_HAVE_SIGSUSPEND     1
00232 #define APR_HAVE_SIGWAIT        1
00233 #define APR_HAVE_STRCASECMP     1
00234 #define APR_HAVE_STRDUP         1
00235 #define APR_HAVE_STRICMP        0
00236 #define APR_HAVE_STRNCASECMP    1
00237 #define APR_HAVE_STRNICMP       0
00238 #define APR_HAVE_STRSTR         1
00239 #define APR_HAVE_MEMCHR         1
00240 #define APR_HAVE_STRUCT_RLIMIT  1
00241 #define APR_HAVE_UNION_SEMUN    0
00242 #define APR_HAVE_SCTP           0
00243 
00244 /*  APR Feature Macros */
00245 #define APR_HAS_SHARED_MEMORY     1
00246 #define APR_HAS_THREADS           1
00247 #define APR_HAS_SENDFILE          1
00248 #define APR_HAS_MMAP              1
00249 #define APR_HAS_FORK              1
00250 #define APR_HAS_RANDOM            1
00251 #define APR_HAS_OTHER_CHILD       1
00252 #define APR_HAS_DSO               1
00253 #define APR_HAS_SO_ACCEPTFILTER   0
00254 #define APR_HAS_UNICODE_FS        0
00255 #define APR_HAS_PROC_INVOKED      0
00256 #define APR_HAS_USER              1
00257 #define APR_HAS_LARGE_FILES       0
00258 #define APR_HAS_XTHREAD_FILES     0
00259 #define APR_HAS_OS_UUID           0
00260 
00261 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
00262  * to poll on files/pipes.  On such a system, the application can
00263  * call apr_socket_from_file() to get an APR socket representation and 
00264  * then pass the socket representation to apr_poll_socket_add().
00265  */
00266 #define APR_FILES_AS_SOCKETS      1
00267 
00268 /* Not all platforms have a real INADDR_NONE.  This macro replaces INADDR_NONE
00269  * on all platforms.
00270  */
00271 #define APR_INADDR_NONE           INADDR_NONE
00272 
00273 /* This macro indicates whether or not EBCDIC is the native character set.
00274  */
00275 #define APR_CHARSET_EBCDIC        0
00276 
00277 /* If we have a TCP implementation that can be "corked", what flag
00278  * do we use?
00279  */
00280 #define APR_TCP_NOPUSH_FLAG       TCP_CORK
00281 
00282 /* Is the TCP_NODELAY socket option inherited from listening sockets?
00283 */
00284 #define APR_TCP_NODELAY_INHERITED 1
00285 
00286 /* Is the O_NONBLOCK flag inherited from listening sockets?
00287 */
00288 #define APR_O_NONBLOCK_INHERITED 0
00289 
00290 /* Typedefs that APR needs. */
00291 
00292 typedef  unsigned char           apr_byte_t;
00293 
00294 typedef  short           apr_int16_t;
00295 typedef  unsigned short  apr_uint16_t;
00296                                                
00297 typedef  int             apr_int32_t;
00298 typedef  unsigned int    apr_uint32_t;
00299                                                
00300 typedef  long long            apr_int64_t;
00301 typedef  unsigned long long   apr_uint64_t;
00302 
00303 typedef  size_t          apr_size_t;
00304 typedef  ssize_t         apr_ssize_t;
00305 typedef  long           apr_off_t;
00306 typedef  socklen_t       apr_socklen_t;
00307 
00308 #define APR_SIZEOF_VOIDP 4
00309 
00310 /* Mechanisms to properly type numeric literals */
00311 #define APR_INT64_C(val) INT64_C(val)
00312 
00313 /* Definitions that APR programs need to work properly. */
00314 
00322 #define APR_THREAD_FUNC
00323 
00344 #define APR_DECLARE(type)            type 
00345 
00355 #define APR_DECLARE_NONSTD(type)     type
00356 
00368 #define APR_DECLARE_DATA
00369 
00370 /* Define APR_SSIZE_T_FMT.  
00371  * If ssize_t is an integer we define it to be "d",
00372  * if ssize_t is a long int we define it to be "ld",
00373  * if ssize_t is neither we declare an error here.
00374  * I looked for a better way to define this here, but couldn't find one, so
00375  * to find the logic for this definition search for "ssize_t_fmt" in
00376  * configure.in.
00377  */
00378 #define APR_SSIZE_T_FMT "d"
00379 
00380 /* And APR_SIZE_T_FMT */
00381 #define APR_SIZE_T_FMT "d"
00382 
00383 /* And APR_OFF_T_FMT */
00384 #define APR_OFF_T_FMT "ld"
00385 
00386 /* And APR_PID_T_FMT */
00387 #define APR_PID_T_FMT "d"
00388 
00389 /* And APR_INT64_T_FMT */
00390 #define APR_INT64_T_FMT "lld"
00391 #define APR_INT64_T_FMT_LEN 3
00392 
00393 /* And APR_UINT64_T_FMT */
00394 #define APR_UINT64_T_FMT "llu"
00395 #define APR_UINT64_T_FMT_LEN 3
00396 
00397 /* And APR_UINT64_T_HEX_FMT */
00398 #define APR_UINT64_T_HEX_FMT "llx"
00399 #define APR_UINT64_T_HEX_FMT_LEN  (sizeof(APR_UINT64_T_HEX_FMT) - 1)
00400 
00401 /* Deal with atoi64 variables ... these should move to apr_private.h */
00402 #define APR_HAVE_INT64_STRFN  1
00403 #define APR_INT64_STRFN       strtoll
00404 
00405 /* are we going to force the generic atomic operations */
00406 #define APR_FORCE_ATOMIC_GENERIC 1
00407 
00408 /* Does the proc mutex lock threads too */
00409 #define APR_PROC_MUTEX_IS_GLOBAL      0
00410 
00411 /* Local machine definition for console and log output. */
00412 #define APR_EOL_STR              "\n"
00413 
00414 
00415 #if APR_HAVE_SYS_WAIT_H
00416 #ifdef WEXITSTATUS
00417 #define apr_wait_t       int
00418 #else
00419 #define apr_wait_t       union wait
00420 #define WEXITSTATUS(status)    (int)((status).w_retcode)
00421 #define WTERMSIG(status)       (int)((status).w_termsig)
00422 #endif /* !WEXITSTATUS */
00423 #endif /* HAVE_SYS_WAIT_H */
00424 
00425 #if defined(PATH_MAX)
00426 #define APR_PATH_MAX       PATH_MAX
00427 #elif defined(_POSIX_PATH_MAX)
00428 #define APR_PATH_MAX       _POSIX_PATH_MAX
00429 #else
00430 #error no decision has been made on APR_PATH_MAX for your platform
00431 #endif
00432 
00435 #ifdef __cplusplus
00436 }
00437 #endif
00438 
00439 #endif /* APR_H */

Generated on Wed Feb 2 11:31:35 2005 for Apache Portable Runtime by  doxygen 1.3.9.1