OSDN Git Service

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