"Fossies" - the Fresh Open Source Software Archive

Member "apr-1.7.0/include/apr.hwc" (21 Mar 2019, 18018 Bytes) of package /linux/www/apr-1.7.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "apr.hwc": 1.6.5_vs_1.7.0.

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