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

apr.h

Go to the documentation of this file.
00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef APR_H
00019 #define APR_H
00020 
00021 /* GENERATED FILE WARNING!  DO NOT EDIT apr.h
00022  *
00023  * You must modify apr.h.in instead.
00024  *
00025  * And please, make an effort to stub apr.hw and apr.hnw in the process.
00026  */
00027 
00045 /* So that we can use inline on some critical functions, and use
00046  * GNUC attributes (such as to get -Wall warnings for printf-like
00047  * functions).  Only do this in gcc 2.7 or later ... it may work
00048  * on earlier stuff, but why chance it.
00049  *
00050  * We've since discovered that the gcc shipped with NeXT systems
00051  * as "cc" is completely broken.  It claims to be __GNUC__ and so
00052  * on, but it doesn't implement half of the things that __GNUC__
00053  * means.  In particular it's missing inline and the __attribute__
00054  * stuff.  So we hack around it.  PR#1613. -djg
00055  */
00056 #if !defined(__GNUC__) || __GNUC__ < 2 || \
00057     (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
00058     defined(NEXT)
00059 #ifndef __attribute__
00060 #define __attribute__(__x)
00061 #endif
00062 #define APR_INLINE
00063 #define APR_HAS_INLINE          0
00064 #else
00065 #define APR_INLINE __inline__
00066 #define APR_HAS_INLINE          1
00067 #endif
00068 
00069 #define APR_HAVE_ARPA_INET_H     1
00070 #define APR_HAVE_CONIO_H         0
00071 #define APR_HAVE_CRYPT_H         0
00072 #define APR_HAVE_CTYPE_H         1
00073 #define APR_HAVE_DIRENT_H        1
00074 #define APR_HAVE_ERRNO_H         1
00075 #define APR_HAVE_FCNTL_H         1
00076 #define APR_HAVE_IO_H            0
00077 #define APR_HAVE_LIMITS_H        1
00078 #define APR_HAVE_NETDB_H         1
00079 #define APR_HAVE_NETINET_IN_H    1
00080 #define APR_HAVE_NETINET_SCTP_H  0
00081 #define APR_HAVE_NETINET_SCTP_UIO_H 0
00082 #define APR_HAVE_NETINET_TCP_H   1
00083 #define APR_HAVE_PTHREAD_H       1
00084 #define APR_HAVE_SEMAPHORE_H     1
00085 #define APR_HAVE_SIGNAL_H        1
00086 #define APR_HAVE_STDARG_H        1
00087 #define APR_HAVE_STDINT_H        1
00088 #define APR_HAVE_STDIO_H         1
00089 #define APR_HAVE_STDLIB_H        1
00090 #define APR_HAVE_STRING_H        1
00091 #define APR_HAVE_STRINGS_H       1
00092 #define APR_HAVE_SYS_IOCTL_H     1
00093 #define APR_HAVE_SYS_SENDFILE_H  0
00094 #define APR_HAVE_SYS_SIGNAL_H    1
00095 #define APR_HAVE_SYS_SOCKET_H    1
00096 #define APR_HAVE_SYS_SOCKIO_H    1
00097 #define APR_HAVE_SYS_SYSLIMITS_H 1
00098 #define APR_HAVE_SYS_TIME_H      1
00099 #define APR_HAVE_SYS_TYPES_H     1
00100 #define APR_HAVE_SYS_UIO_H       1
00101 #define APR_HAVE_SYS_UN_H        1
00102 #define APR_HAVE_SYS_WAIT_H      1
00103 #define APR_HAVE_TIME_H          1
00104 #define APR_HAVE_UNISTD_H        1
00105 
00108 /* We don't include our conditional headers within the doxyblocks 
00109  * or the extern "C" namespace 
00110  */
00111 
00112 #if APR_HAVE_SYS_TYPES_H
00113 #include <sys/types.h>
00114 #endif
00115 
00116 #if APR_HAVE_SYS_SOCKET_H
00117 #include <sys/socket.h>
00118 #endif
00119 
00120 #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
00121 /* C99 7.18.4 requires that stdint.h only exposes INT64_C 
00122  * and UINT64_C for C++ implementations if this is defined: */
00123 #define __STDC_CONSTANT_MACROS
00124 #endif
00125 
00126 #if APR_HAVE_STDINT_H
00127 #include <stdint.h>
00128 #endif
00129 
00130 #if APR_HAVE_SYS_WAIT_H
00131 #include <sys/wait.h>
00132 #endif
00133 
00134 #ifdef OS2
00135 #define INCL_DOS
00136 #define INCL_DOSERRORS
00137 #include <os2.h>
00138 #endif
00139 
00140 /* header files for PATH_MAX, _POSIX_PATH_MAX */
00141 #if APR_HAVE_LIMITS_H
00142 #include <limits.h>
00143 #else
00144 #if APR_HAVE_SYS_SYSLIMITS_H
00145 #include <sys/syslimits.h>
00146 #endif
00147 #endif
00148 
00149 
00150 #ifdef __cplusplus
00151 extern "C" {
00152 #endif
00153 
00160 #define APR_HAVE_SHMEM_MMAP_TMP     1
00161 #define APR_HAVE_SHMEM_MMAP_SHM     1
00162 #define APR_HAVE_SHMEM_MMAP_ZERO    0
00163 #define APR_HAVE_SHMEM_SHMGET_ANON  1
00164 #define APR_HAVE_SHMEM_SHMGET       1
00165 #define APR_HAVE_SHMEM_MMAP_ANON    1
00166 #define APR_HAVE_SHMEM_BEOS         0
00167 
00168 #define APR_USE_SHMEM_MMAP_TMP     0
00169 #define APR_USE_SHMEM_MMAP_SHM     0
00170 #define APR_USE_SHMEM_MMAP_ZERO    0
00171 #define APR_USE_SHMEM_SHMGET_ANON  0
00172 #define APR_USE_SHMEM_SHMGET       1
00173 #define APR_USE_SHMEM_MMAP_ANON    1
00174 #define APR_USE_SHMEM_BEOS         0
00175 
00176 #define APR_USE_FLOCK_SERIALIZE           0 
00177 #define APR_USE_SYSVSEM_SERIALIZE         1
00178 #define APR_USE_POSIXSEM_SERIALIZE        0
00179 #define APR_USE_FCNTL_SERIALIZE           0
00180 #define APR_USE_PROC_PTHREAD_SERIALIZE    0 
00181 #define APR_USE_PTHREAD_SERIALIZE         1 
00182 
00183 #define APR_HAS_FLOCK_SERIALIZE           1
00184 #define APR_HAS_SYSVSEM_SERIALIZE         1
00185 #define APR_HAS_POSIXSEM_SERIALIZE        1
00186 #define APR_HAS_FCNTL_SERIALIZE           1
00187 #define APR_HAS_PROC_PTHREAD_SERIALIZE    0
00188 #define APR_HAS_RWLOCK_SERIALIZE          0
00189 
00190 #define APR_PROCESS_LOCK_IS_GLOBAL        0
00191 
00192 #define APR_HAVE_CORKABLE_TCP   1 
00193 #define APR_HAVE_GETRLIMIT      1
00194 #define APR_HAVE_IN_ADDR        1
00195 #define APR_HAVE_INET_ADDR      1
00196 #define APR_HAVE_INET_NETWORK   1
00197 #define APR_HAVE_IPV6           1
00198 #define APR_HAVE_MEMMOVE        1
00199 #define APR_HAVE_SETRLIMIT      1
00200 #define APR_HAVE_SIGACTION      1
00201 #define APR_HAVE_SIGSUSPEND     1
00202 #define APR_HAVE_SIGWAIT        1
00203 #define APR_HAVE_STRCASECMP     1
00204 #define APR_HAVE_STRDUP         1
00205 #define APR_HAVE_STRICMP        0
00206 #define APR_HAVE_STRNCASECMP    1
00207 #define APR_HAVE_STRNICMP       0
00208 #define APR_HAVE_STRSTR         1
00209 #define APR_HAVE_MEMCHR         1
00210 #define APR_HAVE_STRUCT_RLIMIT  1
00211 #define APR_HAVE_UNION_SEMUN    1
00212 #define APR_HAVE_SCTP           0
00213 
00214 /*  APR Feature Macros */
00215 #define APR_HAS_SHARED_MEMORY     1
00216 #define APR_HAS_THREADS           1
00217 #define APR_HAS_SENDFILE          0
00218 #define APR_HAS_MMAP              1
00219 #define APR_HAS_FORK              1
00220 #define APR_HAS_RANDOM            1
00221 #define APR_HAS_OTHER_CHILD       1
00222 #define APR_HAS_DSO               1
00223 #define APR_HAS_SO_ACCEPTFILTER   0
00224 #define APR_HAS_UNICODE_FS        0
00225 #define APR_HAS_PROC_INVOKED      0
00226 #define APR_HAS_USER              1
00227 #define APR_HAS_LARGE_FILES       0
00228 #define APR_HAS_XTHREAD_FILES     0
00229 #define APR_HAS_OS_UUID           0
00230 
00231 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
00232  * to poll on files/pipes.  On such a system, the application can
00233  * call apr_socket_from_file() to get an APR socket representation and 
00234  * then pass the socket representation to apr_poll_socket_add().
00235  */
00236 #define APR_FILES_AS_SOCKETS      1
00237 
00238 /* Not all platforms have a real INADDR_NONE.  This macro replaces INADDR_NONE
00239  * on all platforms.
00240  */
00241 #define APR_INADDR_NONE           INADDR_NONE
00242 
00243 /* This macro indicates whether or not EBCDIC is the native character set.
00244  */
00245 #define APR_CHARSET_EBCDIC        0
00246 
00247 /* If we have a TCP implementation that can be "corked", what flag
00248  * do we use?
00249  */
00250 #define APR_TCP_NOPUSH_FLAG       TCP_NOPUSH
00251 
00252 /* Is the TCP_NODELAY socket option inherited from listening sockets?
00253 */
00254 #define APR_TCP_NODELAY_INHERITED 1
00255 
00256 /* Is the O_NONBLOCK flag inherited from listening sockets?
00257 */
00258 #define APR_O_NONBLOCK_INHERITED 1
00259 
00260 /* Typedefs that APR needs. */
00261 
00262 typedef  unsigned char           apr_byte_t;
00263 
00264 typedef  short           apr_int16_t;
00265 typedef  unsigned short  apr_uint16_t;
00266                                                
00267 typedef  int             apr_int32_t;
00268 typedef  unsigned int    apr_uint32_t;
00269                                                
00270 typedef  long long            apr_int64_t;
00271 typedef  unsigned long long   apr_uint64_t;
00272 
00273 typedef  size_t          apr_size_t;
00274 typedef  ssize_t         apr_ssize_t;
00275 typedef  off_t           apr_off_t;
00276 typedef  socklen_t       apr_socklen_t;
00277 
00278 #define APR_SIZEOF_VOIDP 4
00279 
00280 /* Mechanisms to properly type numeric literals */
00281 #define APR_INT64_C(val) INT64_C(val)
00282 
00283 /* Definitions that APR programs need to work properly. */
00284 
00292 #define APR_THREAD_FUNC
00293 
00314 #define APR_DECLARE(type)            type 
00315 
00325 #define APR_DECLARE_NONSTD(type)     type
00326 
00338 #define APR_DECLARE_DATA
00339 
00340 /* Define APR_SSIZE_T_FMT.  
00341  * If ssize_t is an integer we define it to be "d",
00342  * if ssize_t is a long int we define it to be "ld",
00343  * if ssize_t is neither we declare an error here.
00344  * I looked for a better way to define this here, but couldn't find one, so
00345  * to find the logic for this definition search for "ssize_t_fmt" in
00346  * configure.in.
00347  */
00348 #define APR_SSIZE_T_FMT "d"
00349 
00350 /* And APR_SIZE_T_FMT */
00351 #define APR_SIZE_T_FMT "lu"
00352 
00353 /* And APR_OFF_T_FMT */
00354 #define APR_OFF_T_FMT APR_INT64_T_FMT
00355 
00356 /* And APR_PID_T_FMT */
00357 #define APR_PID_T_FMT "d"
00358 
00359 /* And APR_INT64_T_FMT */
00360 #define APR_INT64_T_FMT "lld"
00361 #define APR_INT64_T_FMT_LEN 3
00362 
00363 /* And APR_UINT64_T_FMT */
00364 #define APR_UINT64_T_FMT "llu"
00365 #define APR_UINT64_T_FMT_LEN 3
00366 
00367 /* And APR_UINT64_T_HEX_FMT */
00368 #define APR_UINT64_T_HEX_FMT "llx"
00369 #define APR_UINT64_T_HEX_FMT_LEN  (sizeof(APR_UINT64_T_HEX_FMT) - 1)
00370 
00371 /* Deal with atoi64 variables ... these should move to apr_private.h */
00372 #define APR_HAVE_INT64_STRFN  1
00373 #define APR_INT64_STRFN       strtoll
00374 
00375 /* are we going to force the generic atomic operations */
00376 #define APR_FORCE_ATOMIC_GENERIC 0
00377 
00378 /* Does the proc mutex lock threads too */
00379 #define APR_PROC_MUTEX_IS_GLOBAL      0
00380 
00381 /* Local machine definition for console and log output. */
00382 #define APR_EOL_STR              "\n"
00383 
00384 
00385 #if APR_HAVE_SYS_WAIT_H
00386 #ifdef WEXITSTATUS
00387 #define apr_wait_t       int
00388 #else
00389 #define apr_wait_t       union wait
00390 #define WEXITSTATUS(status)    (int)((status).w_retcode)
00391 #define WTERMSIG(status)       (int)((status).w_termsig)
00392 #endif /* !WEXITSTATUS */
00393 #endif /* HAVE_SYS_WAIT_H */
00394 
00395 #if defined(PATH_MAX)
00396 #define APR_PATH_MAX       PATH_MAX
00397 #elif defined(_POSIX_PATH_MAX)
00398 #define APR_PATH_MAX       _POSIX_PATH_MAX
00399 #else
00400 #error no decision has been made on APR_PATH_MAX for your platform
00401 #endif
00402 
00405 #ifdef __cplusplus
00406 }
00407 #endif
00408 
00409 #endif /* APR_H */

Generated on Thu Nov 3 20:34:22 2005 for Apache Portable Runtime by  doxygen 1.4.2