bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr / include / apr.h.save
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements.  See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License.  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef APR_H
19 #define APR_H
20
21 /* GENERATED FILE WARNING!  DO NOT EDIT apr.h
22  *
23  * You must modify apr.h.in instead.
24  *
25  * And please, make an effort to stub apr.hw and apr.hnw in the process.
26  */
27
28 /**
29  * @file apr.h
30  * @brief APR Platform Definitions
31  * @remark This is a generated header generated from include/apr.h.in by
32  * ./configure, or copied from include/apr.hw or include/apr.hnw 
33  * for Win32 or Netware by those build environments, respectively.
34  */
35
36 /**
37  * @defgroup APR Apache Portability Runtime library
38  * @{
39  */
40 /**
41  * @defgroup apr_platform Platform Definitions
42  * @{
43  * @warning
44  * <strong><em>The actual values of macros and typedefs on this page<br>
45  * are platform specific and should NOT be relied upon!</em></strong>
46  */
47
48 /* So that we can use inline on some critical functions, and use
49  * GNUC attributes (such as to get -Wall warnings for printf-like
50  * functions).  Only do this in gcc 2.7 or later ... it may work
51  * on earlier stuff, but why chance it.
52  *
53  * We've since discovered that the gcc shipped with NeXT systems
54  * as "cc" is completely broken.  It claims to be __GNUC__ and so
55  * on, but it doesn't implement half of the things that __GNUC__
56  * means.  In particular it's missing inline and the __attribute__
57  * stuff.  So we hack around it.  PR#1613. -djg
58  */
59 #if !defined(__GNUC__) || __GNUC__ < 2 || \
60     (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
61     defined(NEXT)
62 #ifndef __attribute__
63 #define __attribute__(__x)
64 #endif
65 #define APR_INLINE
66 #define APR_HAS_INLINE          0
67 #else
68 #define APR_INLINE __inline__
69 #define APR_HAS_INLINE          1
70 #endif
71
72 #define APR_HAVE_ARPA_INET_H     1
73 #define APR_HAVE_CONIO_H         0
74 #define APR_HAVE_CRYPT_H         1
75 #define APR_HAVE_CTYPE_H         1
76 #define APR_HAVE_DIRENT_H        1
77 #define APR_HAVE_ERRNO_H         1
78 #define APR_HAVE_FCNTL_H         1
79 #define APR_HAVE_IO_H            0
80 #define APR_HAVE_LIMITS_H        1
81 #define APR_HAVE_NETDB_H         1
82 #define APR_HAVE_NETINET_IN_H    1
83 #define APR_HAVE_NETINET_SCTP_H  0
84 #define APR_HAVE_NETINET_SCTP_UIO_H 0
85 #define APR_HAVE_NETINET_TCP_H   1
86 #define APR_HAVE_PTHREAD_H       1
87 #define APR_HAVE_SEMAPHORE_H     1
88 #define APR_HAVE_SIGNAL_H        1
89 #define APR_HAVE_STDARG_H        1
90 #define APR_HAVE_STDINT_H        1
91 #define APR_HAVE_STDIO_H         1
92 #define APR_HAVE_STDLIB_H        1
93 #define APR_HAVE_STRING_H        1
94 #define APR_HAVE_STRINGS_H       1
95 #define APR_HAVE_SYS_IOCTL_H     1
96 #define APR_HAVE_SYS_SENDFILE_H  1
97 #define APR_HAVE_SYS_SIGNAL_H    1
98 #define APR_HAVE_SYS_SOCKET_H    1
99 #define APR_HAVE_SYS_SOCKIO_H    0
100 #define APR_HAVE_SYS_SYSLIMITS_H 0
101 #define APR_HAVE_SYS_TIME_H      1
102 #define APR_HAVE_SYS_TYPES_H     1
103 #define APR_HAVE_SYS_UIO_H       1
104 #define APR_HAVE_SYS_UN_H        1
105 #define APR_HAVE_SYS_WAIT_H      1
106 #define APR_HAVE_TIME_H          1
107 #define APR_HAVE_UNISTD_H        1
108
109 /** @} */
110
111 /* We don't include our conditional headers within the doxyblocks 
112  * or the extern "C" namespace 
113  */
114
115 #if APR_HAVE_SYS_TYPES_H
116 #include <sys/types.h>
117 #endif
118
119 #if APR_HAVE_SYS_SOCKET_H
120 #include <sys/socket.h>
121 #endif
122
123 #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
124 /* C99 7.18.4 requires that stdint.h only exposes INT64_C 
125  * and UINT64_C for C++ implementations if this is defined: */
126 #define __STDC_CONSTANT_MACROS
127 #endif
128
129 #if APR_HAVE_STDINT_H
130 #include <stdint.h>
131 #endif
132
133 #if APR_HAVE_SYS_WAIT_H
134 #include <sys/wait.h>
135 #endif
136
137 #ifdef OS2
138 #define INCL_DOS
139 #define INCL_DOSERRORS
140 #include <os2.h>
141 #endif
142
143 /* header files for PATH_MAX, _POSIX_PATH_MAX */
144 #if APR_HAVE_LIMITS_H
145 #include <limits.h>
146 #else
147 #if APR_HAVE_SYS_SYSLIMITS_H
148 #include <sys/syslimits.h>
149 #endif
150 #endif
151
152
153 #ifdef __cplusplus
154 extern "C" {
155 #endif
156
157 /**
158  * @addtogroup apr_platform
159  * @ingroup APR 
160  * @{
161  */
162
163 #define APR_HAVE_SHMEM_MMAP_TMP     1
164 #define APR_HAVE_SHMEM_MMAP_SHM     1
165 #define APR_HAVE_SHMEM_MMAP_ZERO    1
166 #define APR_HAVE_SHMEM_SHMGET_ANON  1
167 #define APR_HAVE_SHMEM_SHMGET       1
168 #define APR_HAVE_SHMEM_MMAP_ANON    1
169 #define APR_HAVE_SHMEM_BEOS         0
170
171 #define APR_USE_SHMEM_MMAP_TMP     0
172 #define APR_USE_SHMEM_MMAP_SHM     0
173 #define APR_USE_SHMEM_MMAP_ZERO    0
174 #define APR_USE_SHMEM_SHMGET_ANON  0
175 #define APR_USE_SHMEM_SHMGET       1
176 #define APR_USE_SHMEM_MMAP_ANON    1
177 #define APR_USE_SHMEM_BEOS         0
178
179 #define APR_USE_FLOCK_SERIALIZE           0 
180 #define APR_USE_SYSVSEM_SERIALIZE         1
181 #define APR_USE_POSIXSEM_SERIALIZE        0
182 #define APR_USE_FCNTL_SERIALIZE           0
183 #define APR_USE_PROC_PTHREAD_SERIALIZE    0 
184 #define APR_USE_PTHREAD_SERIALIZE         1 
185
186 #define APR_HAS_FLOCK_SERIALIZE           1
187 #define APR_HAS_SYSVSEM_SERIALIZE         1
188 #define APR_HAS_POSIXSEM_SERIALIZE        0
189 #define APR_HAS_FCNTL_SERIALIZE           1
190 #define APR_HAS_PROC_PTHREAD_SERIALIZE    1
191 #define APR_HAS_RWLOCK_SERIALIZE          0
192
193 #define APR_PROCESS_LOCK_IS_GLOBAL        0
194
195 #define APR_HAVE_CORKABLE_TCP   1 
196 #define APR_HAVE_GETRLIMIT      1
197 #define APR_HAVE_IN_ADDR        1
198 #define APR_HAVE_INET_ADDR      1
199 #define APR_HAVE_INET_NETWORK   1
200 #define APR_HAVE_IPV6           1
201 #define APR_HAVE_MEMMOVE        1
202 #define APR_HAVE_SETRLIMIT      1
203 #define APR_HAVE_SIGACTION      1
204 #define APR_HAVE_SIGSUSPEND     1
205 #define APR_HAVE_SIGWAIT        1
206 #define APR_HAVE_STRCASECMP     1
207 #define APR_HAVE_STRDUP         1
208 #define APR_HAVE_STRICMP        0
209 #define APR_HAVE_STRNCASECMP    1
210 #define APR_HAVE_STRNICMP       0
211 #define APR_HAVE_STRSTR         1
212 #define APR_HAVE_MEMCHR         1
213 #define APR_HAVE_STRUCT_RLIMIT  1
214 #define APR_HAVE_UNION_SEMUN    0
215 #define APR_HAVE_SCTP           0
216
217 /*  APR Feature Macros */
218 #define APR_HAS_SHARED_MEMORY     1
219 #define APR_HAS_THREADS           1
220 #define APR_HAS_SENDFILE          1
221 #define APR_HAS_MMAP              1
222 #define APR_HAS_FORK              1
223 #define APR_HAS_RANDOM            1
224 #define APR_HAS_OTHER_CHILD       1
225 #define APR_HAS_DSO               1
226 #define APR_HAS_SO_ACCEPTFILTER   0
227 #define APR_HAS_UNICODE_FS        0
228 #define APR_HAS_PROC_INVOKED      0
229 #define APR_HAS_USER              1
230 #define APR_HAS_LARGE_FILES       0
231 #define APR_HAS_XTHREAD_FILES     0
232 #define APR_HAS_OS_UUID           0
233
234 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
235  * to poll on files/pipes.  On such a system, the application can
236  * call apr_socket_from_file() to get an APR socket representation and 
237  * then pass the socket representation to apr_poll_socket_add().
238  */
239 #define APR_FILES_AS_SOCKETS      1
240
241 /* Not all platforms have a real INADDR_NONE.  This macro replaces INADDR_NONE
242  * on all platforms.
243  */
244 #define APR_INADDR_NONE           INADDR_NONE
245
246 /* This macro indicates whether or not EBCDIC is the native character set.
247  */
248 #define APR_CHARSET_EBCDIC        0
249
250 /* If we have a TCP implementation that can be "corked", what flag
251  * do we use?
252  */
253 #define APR_TCP_NOPUSH_FLAG       TCP_CORK
254
255 /* Is the TCP_NODELAY socket option inherited from listening sockets?
256 */
257 #define APR_TCP_NODELAY_INHERITED 1
258
259 /* Is the O_NONBLOCK flag inherited from listening sockets?
260 */
261 #define APR_O_NONBLOCK_INHERITED 0
262
263 /* Typedefs that APR needs. */
264
265 typedef  unsigned char           apr_byte_t;
266
267 typedef  short           apr_int16_t;
268 typedef  unsigned short  apr_uint16_t;
269                                                
270 typedef  int             apr_int32_t;
271 typedef  unsigned int    apr_uint32_t;
272                                                
273 typedef  long            apr_int64_t;
274 typedef  unsigned long   apr_uint64_t;
275
276 typedef  size_t          apr_size_t;
277 typedef  ssize_t         apr_ssize_t;
278 typedef  off_t           apr_off_t;
279 typedef  socklen_t       apr_socklen_t;
280
281 typedef unsigned long            apr_ino_t;
282
283 #define APR_SIZEOF_VOIDP 8
284
285 /* Mechanisms to properly type numeric literals */
286 #define APR_INT64_C(val) INT64_C(val)
287
288 /* Definitions that APR programs need to work properly. */
289
290 /** 
291  * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, 
292  * so that they follow the platform's calling convention.
293  * @example
294  */
295 /** void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
296  */
297 #define APR_THREAD_FUNC
298
299 /**
300  * The public APR functions are declared with APR_DECLARE(), so they may
301  * use the most appropriate calling convention.  Public APR functions with 
302  * variable arguments must use APR_DECLARE_NONSTD().
303  *
304  * @remark Both the declaration and implementations must use the same macro.
305  * @example
306  */
307 /** APR_DECLARE(rettype) apr_func(args)
308  * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
309  * @remark Note that when APR compiles the library itself, it passes the 
310  * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) 
311  * to export public symbols from the dynamic library build.\n
312  * The user must define the APR_DECLARE_STATIC when compiling to target
313  * the static APR library on some platforms (e.g. Win32.)  The public symbols 
314  * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
315  * By default, compiling an application and including the APR public
316  * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
317  * linked to the dynamic library.
318  */
319 #define APR_DECLARE(type)            type 
320
321 /**
322  * The public APR functions using variable arguments are declared with 
323  * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
324  * @see APR_DECLARE @see APR_DECLARE_DATA
325  * @remark Both the declaration and implementations must use the same macro.
326  * @example
327  */
328 /** APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
329  */
330 #define APR_DECLARE_NONSTD(type)     type
331
332 /**
333  * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
334  * This assures the appropriate indirection is invoked at compile time.
335  * @see APR_DECLARE @see APR_DECLARE_NONSTD
336  * @remark Note that the declaration and implementations use different forms,
337  * but both must include the macro.
338  * @example
339  */
340 /** extern APR_DECLARE_DATA type apr_variable;\n
341  * APR_DECLARE_DATA type apr_variable = value;
342  */
343 #define APR_DECLARE_DATA
344
345 /* Define APR_SSIZE_T_FMT.  
346  * If ssize_t is an integer we define it to be "d",
347  * if ssize_t is a long int we define it to be "ld",
348  * if ssize_t is neither we declare an error here.
349  * I looked for a better way to define this here, but couldn't find one, so
350  * to find the logic for this definition search for "ssize_t_fmt" in
351  * configure.in.
352  */
353 #define APR_SSIZE_T_FMT "ld"
354
355 /* And APR_SIZE_T_FMT */
356 #define APR_SIZE_T_FMT "ld"
357
358 /* And APR_OFF_T_FMT */
359 #define APR_OFF_T_FMT "ld"
360
361 /* And APR_PID_T_FMT */
362 #define APR_PID_T_FMT "d"
363
364 /* And APR_INT64_T_FMT */
365 #define APR_INT64_T_FMT "ld"
366 #define APR_INT64_T_FMT_LEN 2
367
368 /* And APR_UINT64_T_FMT */
369 #define APR_UINT64_T_FMT "lu"
370 #define APR_UINT64_T_FMT_LEN 2
371
372 /* And APR_UINT64_T_HEX_FMT */
373 #define APR_UINT64_T_HEX_FMT "lx"
374 #define APR_UINT64_T_HEX_FMT_LEN  (sizeof(APR_UINT64_T_HEX_FMT) - 1)
375
376 /* Deal with atoi64 variables ... these should move to apr_private.h */
377 #define APR_HAVE_INT64_STRFN  1
378 #define APR_INT64_STRFN       strtol
379
380 /* are we going to force the generic atomic operations */
381 #define APR_FORCE_ATOMIC_GENERIC 1
382
383 /* Does the proc mutex lock threads too */
384 #define APR_PROC_MUTEX_IS_GLOBAL      0
385
386 /* Local machine definition for console and log output. */
387 #define APR_EOL_STR              "\n"
388
389
390 #if APR_HAVE_SYS_WAIT_H
391 #ifdef WEXITSTATUS
392 #define apr_wait_t       int
393 #else
394 #define apr_wait_t       union wait
395 #define WEXITSTATUS(status)    (int)((status).w_retcode)
396 #define WTERMSIG(status)       (int)((status).w_termsig)
397 #endif /* !WEXITSTATUS */
398 #endif /* HAVE_SYS_WAIT_H */
399
400 #if defined(PATH_MAX)
401 #define APR_PATH_MAX       PATH_MAX
402 #elif defined(_POSIX_PATH_MAX)
403 #define APR_PATH_MAX       _POSIX_PATH_MAX
404 #else
405 #error no decision has been made on APR_PATH_MAX for your platform
406 #endif
407
408 /** @} */
409
410 #ifdef __cplusplus
411 }
412 #endif
413
414 #endif /* APR_H */