~hexmode/+junk/main

« back to all changes in this revision

Viewing changes to install-files/bin/apache/apache2.2.6/include/apr.h

  • Committer: Mark A. Hershberger
  • Date: 2008-01-05 19:38:56 UTC
  • Revision ID: hershberger@spawn-xp-20080105193856-6rnzgwa4nehue3qj
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.hw instead.
 
24
 *
 
25
 * And please, make an effort to stub apr.hnw and apr.h.in in the process.
 
26
 *
 
27
 * This is the Win32 specific version of apr.h.  It is copied from
 
28
 * apr.hw by the apr.dsp and libapr.dsp projects. 
 
29
 */
 
30
 
 
31
/**
 
32
 * @file apr.h
 
33
 * @brief APR Platform Definitions
 
34
 * @remark This is a generated header generated from include/apr.h.in by
 
35
 * ./configure, or copied from include/apr.hw or include/apr.hnw 
 
36
 * for Win32 or Netware by those build environments, respectively.
 
37
 */
 
38
 
 
39
#if defined(WIN32) || defined(DOXYGEN)
 
40
 
 
41
/* Ignore most warnings (back down to /W3) for poorly constructed headers
 
42
 */
 
43
#if defined(_MSC_VER) && _MSC_VER >= 1200
 
44
#pragma warning(push, 3)
 
45
#endif
 
46
 
 
47
/* disable or reduce the frequency of...
 
48
 *   C4057: indirection to slightly different base types
 
49
 *   C4075: slight indirection changes (unsigned short* vs short[])
 
50
 *   C4100: unreferenced formal parameter
 
51
 *   C4127: conditional expression is constant
 
52
 *   C4163: '_rotl64' : not available as an intrinsic function
 
53
 *   C4201: nonstandard extension nameless struct/unions
 
54
 *   C4244: int to char/short - precision loss
 
55
 *   C4514: unreferenced inline function removed
 
56
 */
 
57
#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
 
58
 
 
59
/* Ignore Microsoft's interpretation of secure development
 
60
 * and the POSIX string handling API
 
61
 */
 
62
#if defined(_MSC_VER) && _MSC_VER >= 1400
 
63
#ifndef _CRT_SECURE_NO_DEPRECATE
 
64
#define _CRT_SECURE_NO_DEPRECATE
 
65
#endif
 
66
#pragma warning(disable: 4996)
 
67
#endif
 
68
 
 
69
/* Has windows.h already been included?  If so, our preferences don't matter,
 
70
 * but we will still need the winsock things no matter what was included.
 
71
 * If not, include a restricted set of windows headers to our tastes.
 
72
 */
 
73
#ifndef _WINDOWS_
 
74
#ifndef WIN32_LEAN_AND_MEAN
 
75
#define WIN32_LEAN_AND_MEAN
 
76
#endif
 
77
#ifndef _WIN32_WINNT
 
78
 
 
79
/* Restrict the server to a subset of Windows NT 4.0 header files by default
 
80
 */
 
81
#define _WIN32_WINNT 0x0400
 
82
#endif
 
83
#ifndef NOUSER
 
84
#define NOUSER
 
85
#endif
 
86
#ifndef NOMCX
 
87
#define NOMCX
 
88
#endif
 
89
#ifndef NOIME
 
90
#define NOIME
 
91
#endif
 
92
#include <windows.h>
 
93
/* 
 
94
 * Add a _very_few_ declarations missing from the restricted set of headers
 
95
 * (If this list becomes extensive, re-enable the required headers above!)
 
96
 * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
 
97
 */
 
98
#define SW_HIDE             0
 
99
#ifndef _WIN32_WCE
 
100
#include <winsock2.h>
 
101
#include <mswsock.h>
 
102
#include <ws2tcpip.h>
 
103
#else
 
104
#include <winsock.h>
 
105
#endif
 
106
#endif /* !_WINDOWS_ */
 
107
 
 
108
/**
 
109
 * @defgroup apr_platform Platform Definitions
 
110
 * @ingroup APR 
 
111
 * @{
 
112
 */
 
113
 
 
114
#define APR_INLINE __inline
 
115
#define APR_HAS_INLINE          1
 
116
#if !defined(__GNUC__) && !defined(__attribute__)
 
117
#define __attribute__(__x)
 
118
#endif
 
119
 
 
120
#ifndef _WIN32_WCE
 
121
#define APR_HAVE_ARPA_INET_H    0
 
122
#define APR_HAVE_CONIO_H        1
 
123
#define APR_HAVE_CRYPT_H        0
 
124
#define APR_HAVE_CTYPE_H        1
 
125
#define APR_HAVE_DIRENT_H       0
 
126
#define APR_HAVE_ERRNO_H        1
 
127
#define APR_HAVE_FCNTL_H        1
 
128
#define APR_HAVE_IO_H           1
 
129
#define APR_HAVE_LIMITS_H       1
 
130
#define APR_HAVE_NETDB_H        0
 
131
#define APR_HAVE_NETINET_IN_H   0
 
132
#define APR_HAVE_NETINET_SCTP_H 0
 
133
#define APR_HAVE_NETINET_SCTP_UIO_H 0
 
134
#define APR_HAVE_NETINET_TCP_H  0
 
135
#define APR_HAVE_PTHREAD_H      0
 
136
#define APR_HAVE_SIGNAL_H       1
 
137
#define APR_HAVE_STDARG_H       1
 
138
#define APR_HAVE_STDINT_H       0
 
139
#define APR_HAVE_STDIO_H        1
 
140
#define APR_HAVE_STDLIB_H       1
 
141
#define APR_HAVE_STRING_H       1
 
142
#define APR_HAVE_STRINGS_H      0
 
143
#define APR_HAVE_SYS_SENDFILE_H 0
 
144
#define APR_HAVE_SYS_SIGNAL_H   0
 
145
#define APR_HAVE_SYS_SOCKET_H   0
 
146
#define APR_HAVE_SYS_SOCKIO_H   0
 
147
#define APR_HAVE_SYS_SYSLIMITS_H 0
 
148
#define APR_HAVE_SYS_TIME_H     0
 
149
#define APR_HAVE_SYS_TYPES_H    1
 
150
#define APR_HAVE_SYS_UIO_H      0
 
151
#define APR_HAVE_SYS_WAIT_H     0
 
152
#define APR_HAVE_UNISTD_H       0
 
153
#define APR_HAVE_STDDEF_H       1
 
154
#define APR_HAVE_PROCESS_H      1
 
155
#define APR_HAVE_TIME_H         1
 
156
#else
 
157
#define APR_HAVE_ARPA_INET_H    0
 
158
#define APR_HAVE_CONIO_H        0
 
159
#define APR_HAVE_CRYPT_H        0
 
160
#define APR_HAVE_CTYPE_H        0
 
161
#define APR_HAVE_DIRENT_H       0
 
162
#define APR_HAVE_ERRNO_H        0
 
163
#define APR_HAVE_FCNTL_H        0
 
164
#define APR_HAVE_IO_H           0
 
165
#define APR_HAVE_LIMITS_H       0
 
166
#define APR_HAVE_NETDB_H        0
 
167
#define APR_HAVE_NETINET_IN_H   0
 
168
#define APR_HAVE_NETINET_TCP_H  0
 
169
#define APR_HAVE_PTHREAD_H      0
 
170
#define APR_HAVE_SIGNAL_H       0
 
171
#define APR_HAVE_STDARG_H       0
 
172
#define APR_HAVE_STDINT_H       0
 
173
#define APR_HAVE_STDIO_H        1
 
174
#define APR_HAVE_STDLIB_H       1
 
175
#define APR_HAVE_STRING_H       1
 
176
#define APR_HAVE_STRINGS_H      0
 
177
#define APR_HAVE_SYS_SENDFILE_H 0
 
178
#define APR_HAVE_SYS_SIGNAL_H   0
 
179
#define APR_HAVE_SYS_SOCKET_H   0
 
180
#define APR_HAVE_SYS_SYSLIMITS_H 0
 
181
#define APR_HAVE_SYS_TIME_H     0
 
182
#define APR_HAVE_SYS_TYPES_H    0
 
183
#define APR_HAVE_SYS_UIO_H      0
 
184
#define APR_HAVE_SYS_WAIT_H     0
 
185
#define APR_HAVE_UNISTD_H       0
 
186
#define APR_HAVE_STDDEF_H       0
 
187
#define APR_HAVE_PROCESS_H      0
 
188
#define APR_HAVE_TIME_H         0
 
189
#endif
 
190
 
 
191
#define APR_USE_FLOCK_SERIALIZE           0 
 
192
#define APR_USE_SYSVSEM_SERIALIZE         0
 
193
#define APR_USE_FCNTL_SERIALIZE           0
 
194
#define APR_USE_PROC_PTHREAD_SERIALIZE    0 
 
195
#define APR_USE_PTHREAD_SERIALIZE         0 
 
196
 
 
197
#define APR_HAS_FLOCK_SERIALIZE           0
 
198
#define APR_HAS_SYSVSEM_SERIALIZE         0
 
199
#define APR_HAS_FCNTL_SERIALIZE           0
 
200
#define APR_HAS_PROC_PTHREAD_SERIALIZE    0
 
201
#define APR_HAS_RWLOCK_SERIALIZE          0
 
202
 
 
203
#define APR_HAS_LOCK_CREATE_NP            0
 
204
 
 
205
#define APR_PROCESS_LOCK_IS_GLOBAL        0
 
206
 
 
207
#define APR_USES_ANONYMOUS_SHM            0
 
208
#define APR_USES_FILEBASED_SHM            0
 
209
#define APR_USES_KEYBASED_SHM             0
 
210
 
 
211
#define APR_FILE_BASED_SHM      0
 
212
#define APR_MEM_BASED_SHM       0
 
213
 
 
214
#define APR_HAVE_CORKABLE_TCP   0
 
215
#define APR_HAVE_GETRLIMIT      0
 
216
#define APR_HAVE_ICONV          0
 
217
#define APR_HAVE_IN_ADDR        1
 
218
#define APR_HAVE_INET_ADDR      1
 
219
#define APR_HAVE_INET_NETWORK   0
 
220
#define APR_HAVE_IPV6           0
 
221
#define APR_HAVE_MEMMOVE        1
 
222
#define APR_HAVE_SETRLIMIT      0
 
223
#define APR_HAVE_SIGACTION      0
 
224
#define APR_HAVE_SIGSUSPEND     0
 
225
#define APR_HAVE_SIGWAIT        0
 
226
#define APR_HAVE_STRCASECMP     0
 
227
#define APR_HAVE_STRDUP         1
 
228
#define APR_HAVE_STRNCASECMP    0
 
229
#define APR_HAVE_STRSTR         1
 
230
#define APR_HAVE_MEMCHR         1
 
231
#define APR_HAVE_STRUCT_RLIMIT  0
 
232
#define APR_HAVE_UNION_SEMUN    0
 
233
#define APR_HAVE_SCTP           0
 
234
 
 
235
#ifndef _WIN32_WCE
 
236
#define APR_HAVE_STRICMP        1
 
237
#define APR_HAVE_STRNICMP       1
 
238
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1
 
239
#else
 
240
#define APR_HAVE_STRICMP        0
 
241
#define APR_HAVE_STRNICMP       0
 
242
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
 
243
#endif
 
244
 
 
245
/** @} */
 
246
 
 
247
/* We don't include our conditional headers within the doxyblocks 
 
248
 * or the extern "C" namespace 
 
249
 */
 
250
 
 
251
#if APR_HAVE_STDLIB_H
 
252
#include <stdlib.h>
 
253
#endif
 
254
#if APR_HAVE_STDIO_H
 
255
#include <stdio.h>
 
256
#endif
 
257
#if APR_HAVE_SYS_TYPES_H
 
258
#include <sys/types.h>
 
259
#endif
 
260
#if APR_HAVE_STDDEF_H
 
261
#include <stddef.h>
 
262
#endif
 
263
#if APR_HAVE_TIME_H
 
264
#include <time.h>
 
265
#endif
 
266
#if APR_HAVE_PROCESS_H
 
267
#include <process.h>
 
268
#endif
 
269
#if APR_HAVE_IPV6
 
270
#include <ws2tcpip.h>
 
271
#endif
 
272
 
 
273
#ifdef __cplusplus
 
274
extern "C" {
 
275
#endif
 
276
 
 
277
/**
 
278
 * @addtogroup apr_platform
 
279
 * @ingroup APR 
 
280
 * @{
 
281
 */
 
282
 
 
283
/*  APR Feature Macros */
 
284
#define APR_HAS_SHARED_MEMORY     1
 
285
#define APR_HAS_THREADS           1
 
286
#define APR_HAS_MMAP              1
 
287
#define APR_HAS_FORK              0
 
288
#define APR_HAS_RANDOM            1
 
289
#define APR_HAS_OTHER_CHILD       1
 
290
#define APR_HAS_DSO               1
 
291
#define APR_HAS_SO_ACCEPTFILTER   0
 
292
#define APR_HAS_UNICODE_FS        1
 
293
#define APR_HAS_PROC_INVOKED      1
 
294
#ifndef _WIN32_WCE
 
295
#define APR_HAS_SENDFILE          1
 
296
#define APR_HAS_USER              1
 
297
#define APR_HAS_LARGE_FILES       1
 
298
#define APR_HAS_XTHREAD_FILES     1
 
299
#else
 
300
#define APR_HAS_SENDFILE          0
 
301
#define APR_HAS_USER              0
 
302
#define APR_HAS_LARGE_FILES       0
 
303
#define APR_HAS_XTHREAD_FILES     0
 
304
#endif
 
305
#define APR_HAS_OS_UUID           1
 
306
 
 
307
/* Win32 cannot poll [just yet] on files/pipes.
 
308
 */
 
309
#define APR_FILES_AS_SOCKETS      0
 
310
 
 
311
/* This macro indicates whether or not EBCDIC is the native character set.
 
312
 */
 
313
#define APR_CHARSET_EBCDIC        0
 
314
 
 
315
/* Is the TCP_NODELAY socket option inherited from listening sockets?
 
316
 */
 
317
#define APR_TCP_NODELAY_INHERITED 1
 
318
 
 
319
/* Is the O_NONBLOCK flag inherited from listening sockets?
 
320
 */
 
321
#define APR_O_NONBLOCK_INHERITED  1
 
322
 
 
323
/* Typedefs that APR needs. */
 
324
 
 
325
typedef  unsigned char     apr_byte_t;
 
326
 
 
327
typedef  short             apr_int16_t;
 
328
typedef  unsigned short    apr_uint16_t;
 
329
                                               
 
330
typedef  int               apr_int32_t;
 
331
typedef  unsigned int      apr_uint32_t;
 
332
                                               
 
333
typedef  __int64           apr_int64_t;
 
334
typedef  unsigned __int64  apr_uint64_t;
 
335
 
 
336
typedef  size_t      apr_size_t;
 
337
#if APR_HAVE_STDDEF_H
 
338
typedef  ptrdiff_t   apr_ssize_t;
 
339
#else
 
340
typedef  int         apr_ssize_t;
 
341
#endif
 
342
#if APR_HAS_LARGE_FILES
 
343
typedef  __int64     apr_off_t;
 
344
#else
 
345
typedef  int         apr_off_t;
 
346
#endif
 
347
typedef  int         apr_socklen_t;
 
348
 
 
349
/* Are we big endian? */
 
350
/* XXX: Fatal assumption on Alpha platforms */
 
351
#define APR_IS_BIGENDIAN        0
 
352
 
 
353
#ifdef WIN64
 
354
#define APR_SIZEOF_VOIDP   8
 
355
#else
 
356
#define APR_SIZEOF_VOIDP   4
 
357
#endif
 
358
 
 
359
/* XXX These simply don't belong here, perhaps in apr_portable.h
 
360
 * based on some APR_HAVE_PID/GID/UID?
 
361
 */
 
362
#ifndef __GNUC__
 
363
typedef  int         pid_t;
 
364
#endif
 
365
typedef  int         uid_t;
 
366
typedef  int         gid_t;
 
367
 
 
368
/* Mechanisms to properly type numeric literals */
 
369
 
 
370
#ifndef __GNUC__
 
371
#define APR_INT64_C(val) (val##i64)
 
372
#define APR_UINT64_C(val) (val##Ui64)
 
373
#else
 
374
#define APR_INT64_C(val) (val##LL)
 
375
#define APR_UINT64_C(val) (val##ULL)
 
376
#endif
 
377
 
 
378
#if APR_HAVE_IPV6
 
379
 
 
380
/* Appears in later flavors, not the originals. */
 
381
#ifndef in_addr6
 
382
#define  in6_addr    in_addr6
 
383
#endif
 
384
 
 
385
#ifndef WS2TCPIP_INLINE
 
386
#define IN6_IS_ADDR_V4MAPPED(a) \
 
387
    (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \
 
388
     && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
 
389
#endif
 
390
 
 
391
#endif /* APR_HAS_IPV6 */
 
392
 
 
393
/* Definitions that APR programs need to work properly. */
 
394
 
 
395
/** 
 
396
 * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, 
 
397
 * so that they follow the platform's calling convention.
 
398
 * @example
 
399
 */
 
400
/** void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
 
401
 */
 
402
#define APR_THREAD_FUNC  __stdcall
 
403
 
 
404
 
 
405
#if defined(DOXYGEN) || !defined(WIN32)
 
406
 
 
407
/**
 
408
 * The public APR functions are declared with APR_DECLARE(), so they may
 
409
 * use the most appropriate calling convention.  Public APR functions with 
 
410
 * variable arguments must use APR_DECLARE_NONSTD().
 
411
 *
 
412
 * @remark Both the declaration and implementations must use the same macro.
 
413
 * @example
 
414
 */
 
415
/** APR_DECLARE(rettype) apr_func(args)
 
416
 * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
 
417
 * @remark Note that when APR compiles the library itself, it passes the 
 
418
 * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) 
 
419
 * to export public symbols from the dynamic library build.\n
 
420
 * The user must define the APR_DECLARE_STATIC when compiling to target
 
421
 * the static APR library on some platforms (e.g. Win32.)  The public symbols 
 
422
 * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
 
423
 * By default, compiling an application and including the APR public
 
424
 * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
 
425
 * linked to the dynamic library.
 
426
 */
 
427
#define APR_DECLARE(type)            type 
 
428
 
 
429
/**
 
430
 * The public APR functions using variable arguments are declared with 
 
431
 * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
 
432
 * @see APR_DECLARE @see APR_DECLARE_DATA
 
433
 * @remark Both the declaration and implementations must use the same macro.
 
434
 * @example
 
435
 */
 
436
/** APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
 
437
 */
 
438
#define APR_DECLARE_NONSTD(type)     type
 
439
 
 
440
/**
 
441
 * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
 
442
 * This assures the appropriate indirection is invoked at compile time.
 
443
 * @see APR_DECLARE @see APR_DECLARE_NONSTD
 
444
 * @remark Note that the declaration and implementations use different forms,
 
445
 * but both must include the macro.
 
446
 * @example
 
447
 */
 
448
/** extern APR_DECLARE_DATA type apr_variable;\n
 
449
 * APR_DECLARE_DATA type apr_variable = value;
 
450
 */
 
451
#define APR_DECLARE_DATA
 
452
 
 
453
#elif defined(APR_DECLARE_STATIC)
 
454
#define APR_DECLARE(type)            type __stdcall
 
455
#define APR_DECLARE_NONSTD(type)     type __cdecl
 
456
#define APR_DECLARE_DATA
 
457
#elif defined(APR_DECLARE_EXPORT)
 
458
#define APR_DECLARE(type)            __declspec(dllexport) type __stdcall
 
459
#define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl
 
460
#define APR_DECLARE_DATA             __declspec(dllexport)
 
461
#else
 
462
#define APR_DECLARE(type)            __declspec(dllimport) type __stdcall
 
463
#define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl
 
464
#define APR_DECLARE_DATA             __declspec(dllimport)
 
465
#endif
 
466
 
 
467
#ifdef WIN64
 
468
#define APR_SSIZE_T_FMT          "I64d"
 
469
#define APR_SIZE_T_FMT           "I64d"
 
470
#else
 
471
#define APR_SSIZE_T_FMT          "d"
 
472
#define APR_SIZE_T_FMT           "d"
 
473
#endif
 
474
 
 
475
#if APR_HAS_LARGE_FILES
 
476
#define APR_OFF_T_FMT            "I64d"
 
477
#else
 
478
#define APR_OFF_T_FMT            "d"
 
479
#endif
 
480
 
 
481
#define APR_PID_T_FMT            "d"
 
482
 
 
483
#define APR_INT64_T_FMT          "I64d"
 
484
#define APR_UINT64_T_FMT         "I64u"
 
485
#define APR_UINT64_T_HEX_FMT     "I64x"
 
486
 
 
487
/* Local machine definition for console and log output. */
 
488
#define APR_EOL_STR              "\r\n"
 
489
 
 
490
/* No difference between PROC and GLOBAL mutex */
 
491
#define APR_PROC_MUTEX_IS_GLOBAL      1
 
492
 
 
493
typedef int apr_wait_t;
 
494
 
 
495
/* struct iovec is needed to emulate Unix writev */
 
496
struct iovec {
 
497
    char*      iov_base;
 
498
    apr_size_t iov_len;
 
499
};
 
500
 
 
501
/* Nasty Win32 .h ommissions we really need */
 
502
#define STDIN_FILENO  0
 
503
#define STDOUT_FILENO 1
 
504
#define STDERR_FILENO 2
 
505
 
 
506
#if APR_HAS_UNICODE_FS
 
507
/* An arbitrary size that is digestable. True max is a bit less than 32000 */
 
508
#define APR_PATH_MAX 8192
 
509
#else /* !APR_HAS_UNICODE_FS */
 
510
#define APR_PATH_MAX MAX_PATH
 
511
#endif
 
512
 
 
513
/** @} */
 
514
 
 
515
#ifdef __cplusplus
 
516
}
 
517
#endif
 
518
 
 
519
/* Done with badly written headers
 
520
 */
 
521
#if defined(_MSC_VER) && _MSC_VER >= 1200
 
522
#pragma warning(pop)
 
523
#pragma warning(disable: 4996)
 
524
#endif
 
525
 
 
526
#endif /* WIN32 */
 
527
 
 
528
#endif /* APR_H */