]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/apr/include/apr.hwc
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / apr / include / apr.hwc
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.hwc 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 /* Make sure we have our platform identifier macro defined we ask for later.
40  */
41 #if defined(_WIN32) && !defined(WIN32)
42 #define WIN32 1
43 #endif
44
45 #if defined(WIN32) || defined(DOXYGEN)
46
47 /* Ignore most warnings (back down to /W3) for poorly constructed headers
48  */
49 #if defined(_MSC_VER) && _MSC_VER >= 1200
50 #pragma warning(push, 3)
51 #endif
52
53 /* disable or reduce the frequency of...
54  *   C4057: indirection to slightly different base types
55  *   C4075: slight indirection changes (unsigned short* vs short[])
56  *   C4100: unreferenced formal parameter
57  *   C4127: conditional expression is constant
58  *   C4163: '_rotl64' : not available as an intrinsic function
59  *   C4201: nonstandard extension nameless struct/unions
60  *   C4244: int to char/short - precision loss
61  *   C4514: unreferenced inline function removed
62  */
63 #pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
64
65 /* Ignore Microsoft's interpretation of secure development
66  * and the POSIX string handling API
67  */
68 #if defined(_MSC_VER) && _MSC_VER >= 1400
69 #ifndef _CRT_SECURE_NO_DEPRECATE
70 #define _CRT_SECURE_NO_DEPRECATE
71 #endif
72 #pragma warning(disable: 4996)
73 #endif
74
75 /* Has windows.h already been included?  If so, our preferences don't matter,
76  * but we will still need the winsock things no matter what was included.
77  * If not, include a restricted set of windows headers to our tastes.
78  */
79 #ifndef _WINDOWS_
80 #ifndef WIN32_LEAN_AND_MEAN
81 #define WIN32_LEAN_AND_MEAN
82 #endif
83 #ifndef _WIN32_WINNT
84 #define _WIN32_WINNT @win32_winnt_str@
85 #endif
86 #ifndef NOUSER
87 #define NOUSER
88 #endif
89 #ifndef NOMCX
90 #define NOMCX
91 #endif
92 #ifndef NOIME
93 #define NOIME
94 #endif
95 #include <windows.h>
96 /* 
97  * Add a _very_few_ declarations missing from the restricted set of headers
98  * (If this list becomes extensive, re-enable the required headers above!)
99  * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
100  */
101 #define SW_HIDE             0
102 #ifndef _WIN32_WCE
103 #include <winsock2.h>
104 #include <ws2tcpip.h>
105 #include <mswsock.h>
106 #else
107 #include <winsock.h>
108 #endif
109 #endif /* !_WINDOWS_ */
110
111 /**
112  * @defgroup APR Apache Portability Runtime library
113  * @{
114  */
115 /**
116  * @defgroup apr_platform Platform Definitions
117  * @{
118  * @warning
119  * <strong><em>The actual values of macros and typedefs on this page<br>
120  * are platform specific and should NOT be relied upon!</em></strong>
121  */
122
123 #define APR_INLINE __inline
124 #define APR_HAS_INLINE          1
125 #if !defined(__GNUC__) && !defined(__attribute__)
126 #define __attribute__(__x)
127 #endif
128
129 #ifndef _WIN32_WCE
130 #define APR_HAVE_ARPA_INET_H    0
131 #define APR_HAVE_CONIO_H        1
132 #define APR_HAVE_CRYPT_H        0
133 #define APR_HAVE_CTYPE_H        1
134 #define APR_HAVE_DIRENT_H       0
135 #define APR_HAVE_ERRNO_H        1
136 #define APR_HAVE_FCNTL_H        1
137 #define APR_HAVE_IO_H           1
138 #define APR_HAVE_LIMITS_H       1
139 #define APR_HAVE_NETDB_H        0
140 #define APR_HAVE_NETINET_IN_H   0
141 #define APR_HAVE_NETINET_SCTP_H 0
142 #define APR_HAVE_NETINET_SCTP_UIO_H 0
143 #define APR_HAVE_NETINET_TCP_H  0
144 #define APR_HAVE_PTHREAD_H      0
145 #define APR_HAVE_SEMAPHORE_H    0
146 #define APR_HAVE_SIGNAL_H       1
147 #define APR_HAVE_STDARG_H       1
148 #define APR_HAVE_STDINT_H       0
149 #define APR_HAVE_STDIO_H        1
150 #define APR_HAVE_STDLIB_H       1
151 #define APR_HAVE_STRING_H       1
152 #define APR_HAVE_STRINGS_H      0
153 #define APR_HAVE_SYS_IOCTL_H    0
154 #define APR_HAVE_SYS_SENDFILE_H 0
155 #define APR_HAVE_SYS_SIGNAL_H   0
156 #define APR_HAVE_SYS_SOCKET_H   0
157 #define APR_HAVE_SYS_SOCKIO_H   0
158 #define APR_HAVE_SYS_SYSLIMITS_H 0
159 #define APR_HAVE_SYS_TIME_H     0
160 #define APR_HAVE_SYS_TYPES_H    1
161 #define APR_HAVE_SYS_UIO_H      0
162 #define APR_HAVE_SYS_UN_H       0
163 #define APR_HAVE_SYS_WAIT_H     0
164 #define APR_HAVE_TIME_H         1
165 #define APR_HAVE_UNISTD_H       0
166 #define APR_HAVE_STDDEF_H       1
167 #define APR_HAVE_PROCESS_H      1
168 #else
169 #define APR_HAVE_ARPA_INET_H    0
170 #define APR_HAVE_CONIO_H        0
171 #define APR_HAVE_CRYPT_H        0
172 #define APR_HAVE_CTYPE_H        0
173 #define APR_HAVE_DIRENT_H       0
174 #define APR_HAVE_ERRNO_H        0
175 #define APR_HAVE_FCNTL_H        0
176 #define APR_HAVE_IO_H           0
177 #define APR_HAVE_LIMITS_H       0
178 #define APR_HAVE_NETDB_H        0
179 #define APR_HAVE_NETINET_IN_H   0
180 #define APR_HAVE_NETINET_SCTP_H 0
181 #define APR_HAVE_NETINET_SCTP_UIO_H 0
182 #define APR_HAVE_NETINET_TCP_H  0
183 #define APR_HAVE_PTHREAD_H      0
184 #define APR_HAVE_SEMAPHORE_H    0
185 #define APR_HAVE_SIGNAL_H       0
186 #define APR_HAVE_STDARG_H       0
187 #define APR_HAVE_STDINT_H       0
188 #define APR_HAVE_STDIO_H        1
189 #define APR_HAVE_STDLIB_H       1
190 #define APR_HAVE_STRING_H       1
191 #define APR_HAVE_STRINGS_H      0
192 #define APR_HAVE_SYS_IOCTL_H    0
193 #define APR_HAVE_SYS_SENDFILE_H 0
194 #define APR_HAVE_SYS_SIGNAL_H   0
195 #define APR_HAVE_SYS_SOCKET_H   0
196 #define APR_HAVE_SYS_SOCKIO_H   0
197 #define APR_HAVE_SYS_SYSLIMITS_H 0
198 #define APR_HAVE_SYS_TIME_H     0
199 #define APR_HAVE_SYS_TYPES_H    0
200 #define APR_HAVE_SYS_UIO_H      0
201 #define APR_HAVE_SYS_UN_H       0
202 #define APR_HAVE_SYS_WAIT_H     0
203 #define APR_HAVE_TIME_H         0
204 #define APR_HAVE_UNISTD_H       0
205 #define APR_HAVE_STDDEF_H       0
206 #define APR_HAVE_PROCESS_H      0
207 #endif
208
209 /** @} */
210 /** @} */
211
212 /* We don't include our conditional headers within the doxyblocks 
213  * or the extern "C" namespace 
214  */
215
216 #if APR_HAVE_STDLIB_H
217 #include <stdlib.h>
218 #endif
219 #if APR_HAVE_STDIO_H
220 #include <stdio.h>
221 #endif
222 #if APR_HAVE_SYS_TYPES_H
223 #include <sys/types.h>
224 #endif
225 #if APR_HAVE_STDDEF_H
226 #include <stddef.h>
227 #endif
228 #if APR_HAVE_TIME_H
229 #include <time.h>
230 #endif
231 #if APR_HAVE_PROCESS_H
232 #include <process.h>
233 #endif
234
235 #ifdef __cplusplus
236 extern "C" {
237 #endif
238
239 /**
240  * @addtogroup apr_platform
241  * @ingroup APR 
242  * @{
243  */
244
245 #define APR_HAVE_SHMEM_MMAP_TMP     0
246 #define APR_HAVE_SHMEM_MMAP_SHM     0
247 #define APR_HAVE_SHMEM_MMAP_ZERO    0
248 #define APR_HAVE_SHMEM_SHMGET_ANON  0
249 #define APR_HAVE_SHMEM_SHMGET       0
250 #define APR_HAVE_SHMEM_MMAP_ANON    0
251 #define APR_HAVE_SHMEM_BEOS         0
252
253 #define APR_USE_SHMEM_MMAP_TMP     0
254 #define APR_USE_SHMEM_MMAP_SHM     0
255 #define APR_USE_SHMEM_MMAP_ZERO    0
256 #define APR_USE_SHMEM_SHMGET_ANON  0
257 #define APR_USE_SHMEM_SHMGET       0
258 #define APR_USE_SHMEM_MMAP_ANON    0
259 #define APR_USE_SHMEM_BEOS         0
260
261 #define APR_USE_FLOCK_SERIALIZE           0 
262 #define APR_USE_POSIXSEM_SERIALIZE        0
263 #define APR_USE_SYSVSEM_SERIALIZE         0
264 #define APR_USE_FCNTL_SERIALIZE           0
265 #define APR_USE_PROC_PTHREAD_SERIALIZE    0 
266 #define APR_USE_PTHREAD_SERIALIZE         0 
267
268 #define APR_HAS_FLOCK_SERIALIZE           0
269 #define APR_HAS_SYSVSEM_SERIALIZE         0
270 #define APR_HAS_POSIXSEM_SERIALIZE        0
271 #define APR_HAS_FCNTL_SERIALIZE           0
272 #define APR_HAS_PROC_PTHREAD_SERIALIZE    0
273
274 #define APR_PROCESS_LOCK_IS_GLOBAL        0
275
276 #define APR_HAVE_CORKABLE_TCP   0
277 #define APR_HAVE_GETRLIMIT      0
278 #define APR_HAVE_ICONV          0
279 #define APR_HAVE_IN_ADDR        1
280 #define APR_HAVE_INET_ADDR      1
281 #define APR_HAVE_INET_NETWORK   0
282 #define APR_HAVE_IPV6           @apr_have_ipv6_10@
283 #define APR_HAVE_MEMMOVE        1
284 #define APR_HAVE_SETRLIMIT      0
285 #define APR_HAVE_SIGACTION      0
286 #define APR_HAVE_SIGSUSPEND     0
287 #define APR_HAVE_SIGWAIT        0
288 #define APR_HAVE_SA_STORAGE     0
289 #define APR_HAVE_STRCASECMP     0
290 #define APR_HAVE_STRDUP         1
291 #define APR_HAVE_STRNCASECMP    0
292 #define APR_HAVE_STRSTR         1
293 #define APR_HAVE_MEMCHR         1
294 #define APR_HAVE_STRUCT_RLIMIT  0
295 #define APR_HAVE_UNION_SEMUN    0
296 #define APR_HAVE_SCTP           0
297 #define APR_HAVE_IOVEC          0
298
299 #ifndef _WIN32_WCE
300 #define APR_HAVE_STRICMP        1
301 #define APR_HAVE_STRNICMP       1
302 #else
303 #define APR_HAVE_STRICMP        0
304 #define APR_HAVE_STRNICMP       0
305 #endif
306
307 /*  APR Feature Macros */
308 #define APR_HAS_SHARED_MEMORY     1
309 #define APR_HAS_THREADS           1
310 #define APR_HAS_MMAP              1
311 #define APR_HAS_FORK              0
312 #define APR_HAS_RANDOM            1
313 #define APR_HAS_OTHER_CHILD       1
314 #define APR_HAS_DSO               1
315 #define APR_HAS_SO_ACCEPTFILTER   0
316 #define APR_HAS_UNICODE_FS        1
317 #define APR_HAS_PROC_INVOKED      1
318 #define APR_HAS_OS_UUID           1
319
320 #ifndef _WIN32_WCE
321 #define APR_HAS_SENDFILE          1
322 #define APR_HAS_USER              1
323 #define APR_HAS_LARGE_FILES       1
324 #define APR_HAS_XTHREAD_FILES     1
325 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1
326 #else
327 #define APR_HAS_SENDFILE          0
328 #define APR_HAS_USER              0
329 #define APR_HAS_LARGE_FILES       0
330 #define APR_HAS_XTHREAD_FILES     0
331 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
332 #endif
333
334 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
335  * to poll on files/pipes.
336  */
337 #define APR_FILES_AS_SOCKETS      0
338
339 /* This macro indicates whether or not EBCDIC is the native character set.
340  */
341 #define APR_CHARSET_EBCDIC        0
342
343 /* If we have a TCP implementation that can be "corked", what flag
344  * do we use?
345  */
346 #define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
347
348 /* Is the TCP_NODELAY socket option inherited from listening sockets?
349  */
350 #define APR_TCP_NODELAY_INHERITED 1
351
352 /* Is the O_NONBLOCK flag inherited from listening sockets?
353  */
354 #define APR_O_NONBLOCK_INHERITED  1
355
356 /* Typedefs that APR needs. */
357
358 typedef  unsigned char     apr_byte_t;
359
360 typedef  short             apr_int16_t;
361 typedef  unsigned short    apr_uint16_t;
362
363 typedef  int               apr_int32_t;
364 typedef  unsigned int      apr_uint32_t;
365
366 typedef  __int64           apr_int64_t;
367 typedef  unsigned __int64  apr_uint64_t;
368
369 typedef  size_t      apr_size_t;
370 #if APR_HAVE_STDDEF_H
371 typedef  ptrdiff_t   apr_ssize_t;
372 #else
373 typedef  int         apr_ssize_t;
374 #endif
375 #if APR_HAS_LARGE_FILES
376 typedef  __int64     apr_off_t;
377 #else
378 typedef  int         apr_off_t;
379 #endif
380 typedef  int         apr_socklen_t;
381 typedef  apr_uint64_t      apr_ino_t;
382
383 #ifdef _WIN64
384 #define APR_SIZEOF_VOIDP   8
385 #else
386 #define APR_SIZEOF_VOIDP   4
387 #endif
388
389 #if APR_SIZEOF_VOIDP == 8
390 typedef  apr_uint64_t            apr_uintptr_t;
391 #else
392 typedef  apr_uint32_t            apr_uintptr_t;
393 #endif
394
395 /* Are we big endian? */
396 /* XXX: Fatal assumption on Alpha platforms */
397 #define APR_IS_BIGENDIAN        0
398
399 /* Mechanisms to properly type numeric literals */
400
401 #ifndef __GNUC__
402 #define APR_INT64_C(val) (val##i64)
403 #define APR_UINT64_C(val) (val##Ui64)
404 #else
405 #define APR_INT64_C(val) (val##LL)
406 #define APR_UINT64_C(val) (val##ULL)
407 #endif
408
409 #ifdef INT16_MIN
410 #define APR_INT16_MIN   INT16_MIN
411 #else
412 #define APR_INT16_MIN   (-0x7fff - 1)
413 #endif
414
415 #ifdef INT16_MAX
416 #define APR_INT16_MAX  INT16_MAX
417 #else
418 #define APR_INT16_MAX   (0x7fff)
419 #endif
420
421 #ifdef UINT16_MAX
422 #define APR_UINT16_MAX  UINT16_MAX
423 #else
424 #define APR_UINT16_MAX  (0xffff)
425 #endif
426
427 #ifdef INT32_MIN
428 #define APR_INT32_MIN   INT32_MIN
429 #else
430 #define APR_INT32_MIN   (-0x7fffffff - 1)
431 #endif
432
433 #ifdef INT32_MAX
434 #define APR_INT32_MAX  INT32_MAX
435 #else
436 #define APR_INT32_MAX  0x7fffffff
437 #endif
438
439 #ifdef UINT32_MAX
440 #define APR_UINT32_MAX  UINT32_MAX
441 #else
442 #define APR_UINT32_MAX  (0xffffffffU)
443 #endif
444
445 #ifdef INT64_MIN
446 #define APR_INT64_MIN   INT64_MIN
447 #else
448 #define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)
449 #endif
450
451 #ifdef INT64_MAX
452 #define APR_INT64_MAX   INT64_MAX
453 #else
454 #define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)
455 #endif
456
457 #ifdef UINT64_MAX
458 #define APR_UINT64_MAX  UINT64_MAX
459 #else
460 #define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)
461 #endif
462
463 #define APR_SIZE_MAX    (~((apr_size_t)0))
464
465 /* Definitions that APR programs need to work properly. */
466
467 /**
468  * APR public API wrap for C++ compilers.
469  */
470 #ifdef __cplusplus
471 #define APR_BEGIN_DECLS     extern "C" {
472 #define APR_END_DECLS       }
473 #else
474 #define APR_BEGIN_DECLS
475 #define APR_END_DECLS
476 #endif
477
478 /** 
479  * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, 
480  * so that they follow the platform's calling convention.
481  * <PRE>
482  *
483  * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
484  *
485  * </PRE>
486  */
487 #define APR_THREAD_FUNC  __stdcall
488
489
490 #if defined(DOXYGEN) || !defined(WIN32)
491
492 /**
493  * The public APR functions are declared with APR_DECLARE(), so they may
494  * use the most appropriate calling convention.  Public APR functions with 
495  * variable arguments must use APR_DECLARE_NONSTD().
496  *
497  * @remark Both the declaration and implementations must use the same macro.
498  *
499  * <PRE>
500  * APR_DECLARE(rettype) apr_func(args)
501  * </PRE>
502  * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
503  * @remark Note that when APR compiles the library itself, it passes the 
504  * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) 
505  * to export public symbols from the dynamic library build.\n
506  * The user must define the APR_DECLARE_STATIC when compiling to target
507  * the static APR library on some platforms (e.g. Win32.)  The public symbols 
508  * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
509  * By default, compiling an application and including the APR public
510  * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
511  * linked to the dynamic library.
512  */
513 #define APR_DECLARE(type)            type 
514
515 /**
516  * The public APR functions using variable arguments are declared with 
517  * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
518  * @see APR_DECLARE @see APR_DECLARE_DATA
519  * @remark Both the declaration and implementations must use the same macro.
520  * <PRE>
521  *
522  * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
523  *
524  * </PRE>
525  */
526 #define APR_DECLARE_NONSTD(type)     type
527
528 /**
529  * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
530  * This assures the appropriate indirection is invoked at compile time.
531  * @see APR_DECLARE @see APR_DECLARE_NONSTD
532  * @remark Note that the declaration and implementations use different forms,
533  * but both must include the macro.
534  * 
535  * <PRE>
536  *
537  * extern APR_DECLARE_DATA type apr_variable;\n
538  * APR_DECLARE_DATA type apr_variable = value;
539  *
540  * </PRE>
541  */
542 #define APR_DECLARE_DATA
543
544 #elif defined(APR_DECLARE_STATIC)
545 #define APR_DECLARE(type)            type __stdcall
546 #define APR_DECLARE_NONSTD(type)     type __cdecl
547 #define APR_DECLARE_DATA
548 #elif defined(APR_DECLARE_EXPORT)
549 #define APR_DECLARE(type)            __declspec(dllexport) type __stdcall
550 #define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl
551 #define APR_DECLARE_DATA             __declspec(dllexport)
552 #else
553 #define APR_DECLARE(type)            __declspec(dllimport) type __stdcall
554 #define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl
555 #define APR_DECLARE_DATA             __declspec(dllimport)
556 #endif
557
558 #ifdef _WIN64
559 #define APR_SSIZE_T_FMT          "I64d"
560 #define APR_SIZE_T_FMT           "I64u"
561 #else
562 #define APR_SSIZE_T_FMT          "d"
563 #define APR_SIZE_T_FMT           "u"
564 #endif
565
566 #if APR_HAS_LARGE_FILES
567 #define APR_OFF_T_FMT            "I64d"
568 #else
569 #define APR_OFF_T_FMT            "d"
570 #endif
571
572 #define APR_PID_T_FMT            "d"
573
574 #define APR_INT64_T_FMT          "I64d"
575 #define APR_UINT64_T_FMT         "I64u"
576 #define APR_UINT64_T_HEX_FMT     "I64x"
577
578 /* No difference between PROC and GLOBAL mutex */
579 #define APR_PROC_MUTEX_IS_GLOBAL      1
580
581 /* Local machine definition for console and log output. */
582 #define APR_EOL_STR              "\r\n"
583
584 typedef int apr_wait_t;
585
586 #if APR_HAS_UNICODE_FS
587 /* An arbitrary size that is digestable. True max is a bit less than 32000 */
588 #define APR_PATH_MAX 8192
589 #else /* !APR_HAS_UNICODE_FS */
590 #define APR_PATH_MAX MAX_PATH
591 #endif
592
593 #define APR_DSOPATH "PATH"
594
595 /** @} */
596
597 /* Definitions that only Win32 programs need to compile properly. */
598
599 /* XXX These simply don't belong here, perhaps in apr_portable.h
600  * based on some APR_HAVE_PID/GID/UID?
601  */
602 #ifndef __GNUC__
603 typedef  int         pid_t;
604 #endif
605 typedef  int         uid_t;
606 typedef  int         gid_t;
607
608 /* Win32 .h ommissions we really need */
609 #define STDIN_FILENO  0
610 #define STDOUT_FILENO 1
611 #define STDERR_FILENO 2
612
613 #if APR_HAVE_IPV6
614
615 /* Appears in later flavors, not the originals. */
616 #ifndef in_addr6
617 #define  in6_addr    in_addr6
618 #endif
619
620 #ifndef WS2TCPIP_INLINE
621 #define IN6_IS_ADDR_V4MAPPED(a) \
622     (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \
623      && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
624 #endif
625
626 #endif /* APR_HAS_IPV6 */
627
628 #ifdef __cplusplus
629 }
630 #endif
631
632 /* Done with badly written headers
633  */
634 #if defined(_MSC_VER) && _MSC_VER >= 1200
635 #pragma warning(pop)
636 #pragma warning(disable: 4996)
637 #endif
638
639 #endif /* WIN32 */
640
641 #endif /* APR_H */