"Fossies" - the Fresh Open Source Software Archive

Member "apr-1.7.0/include/apr.h.in" (22 Mar 2019, 19286 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.h.in": 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.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     @arpa_ineth@
   73 #define APR_HAVE_CONIO_H         @conioh@
   74 #define APR_HAVE_CRYPT_H         @crypth@
   75 #define APR_HAVE_CTYPE_H         @ctypeh@
   76 #define APR_HAVE_DIRENT_H        @direnth@
   77 #define APR_HAVE_ERRNO_H         @errnoh@
   78 #define APR_HAVE_FCNTL_H         @fcntlh@
   79 #define APR_HAVE_IO_H            @ioh@
   80 #define APR_HAVE_LIMITS_H        @limitsh@
   81 #define APR_HAVE_NETDB_H         @netdbh@
   82 #define APR_HAVE_NETINET_IN_H    @netinet_inh@
   83 #define APR_HAVE_NETINET_SCTP_H  @netinet_sctph@
   84 #define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
   85 #define APR_HAVE_NETINET_TCP_H   @netinet_tcph@
   86 #define APR_HAVE_PROCESS_H       @processh@
   87 #define APR_HAVE_PTHREAD_H       @pthreadh@
   88 #define APR_HAVE_SEMAPHORE_H     @semaphoreh@
   89 #define APR_HAVE_SIGNAL_H        @signalh@
   90 #define APR_HAVE_STDARG_H        @stdargh@
   91 #define APR_HAVE_STDINT_H        @stdint@
   92 #define APR_HAVE_STDIO_H         @stdioh@
   93 #define APR_HAVE_STDLIB_H        @stdlibh@
   94 #define APR_HAVE_STRING_H        @stringh@
   95 #define APR_HAVE_STRINGS_H       @stringsh@
   96 #define APR_HAVE_INTTYPES_H      @inttypesh@
   97 #define APR_HAVE_SYS_IOCTL_H     @sys_ioctlh@
   98 #define APR_HAVE_SYS_SENDFILE_H  @sys_sendfileh@
   99 #define APR_HAVE_SYS_SIGNAL_H    @sys_signalh@
  100 #define APR_HAVE_SYS_SOCKET_H    @sys_socketh@
  101 #define APR_HAVE_SYS_SOCKIO_H    @sys_sockioh@
  102 #define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@
  103 #define APR_HAVE_SYS_TIME_H      @sys_timeh@
  104 #define APR_HAVE_SYS_TYPES_H     @sys_typesh@
  105 #define APR_HAVE_SYS_UIO_H       @sys_uioh@
  106 #define APR_HAVE_SYS_UN_H        @sys_unh@
  107 #define APR_HAVE_SYS_WAIT_H      @sys_waith@
  108 #define APR_HAVE_TIME_H          @timeh@
  109 #define APR_HAVE_UNISTD_H        @unistdh@
  110 #define APR_HAVE_WINDOWS_H       @windowsh@
  111 #define APR_HAVE_WINSOCK2_H      @winsock2h@
  112 
  113 /** @} */
  114 /** @} */
  115 
  116 /* We don't include our conditional headers within the doxyblocks 
  117  * or the extern "C" namespace 
  118  */
  119 
  120 #if APR_HAVE_WINDOWS_H && defined(WIN32)
  121 /* If windows.h was already included, our preferences don't matter.
  122  * If not, include a restricted set of windows headers to our tastes.
  123  */
  124 #ifndef _WINDOWS_
  125 
  126 #ifndef WIN32_LEAN_AND_MEAN
  127 #define WIN32_LEAN_AND_MEAN
  128 #endif
  129 
  130 #ifndef _WIN32_WINNT
  131 /* Restrict the server to a subset of Windows XP header files by default
  132  */
  133 #define _WIN32_WINNT 0x0501
  134 #endif
  135 
  136 #ifndef NOUSER
  137 #define NOUSER
  138 #endif
  139 #ifndef NOMCX
  140 #define NOMCX
  141 #endif
  142 #ifndef NOIME
  143 #define NOIME
  144 #endif
  145 
  146 #include <windows.h>
  147 /* 
  148  * Add a _very_few_ declarations missing from the restricted set of headers
  149  * (If this list becomes extensive, re-enable the required headers above!)
  150  * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
  151  */
  152 #define SW_HIDE             0
  153 #ifndef _WIN32_WCE
  154 #include <winsock2.h>
  155 #include <ws2tcpip.h>
  156 #include <mswsock.h>
  157 #else
  158 #include <winsock.h>
  159 #endif
  160 
  161 #endif /* ndef _WINDOWS_ */
  162 #endif /* APR_HAVE_WINDOWS_H */
  163 
  164 #if APR_HAVE_SYS_TYPES_H
  165 #include <sys/types.h>
  166 #endif
  167 
  168 #if APR_HAVE_SYS_SOCKET_H
  169 #include <sys/socket.h>
  170 #endif
  171 
  172 #if APR_HAVE_STDINT_H
  173 #ifdef __cplusplus
  174 /* C99 7.18.4 requires that stdint.h only exposes INT64_C 
  175  * and UINT64_C for C++ implementations if this is defined: */
  176 #ifndef __STDC_CONSTANT_MACROS
  177 #define __STDC_CONSTANT_MACROS
  178 #endif
  179 /* C++ needs this too for PRI*NN formats: */
  180 #ifndef __STDC_FORMAT_MACROS
  181 #define __STDC_FORMAT_MACROS
  182 #endif
  183 #endif /* __cplusplus */
  184 #include <stdint.h>
  185 #endif
  186 
  187 #if APR_HAVE_INTTYPES_H
  188 #include <inttypes.h>
  189 #endif
  190 
  191 #if APR_HAVE_SYS_WAIT_H
  192 #include <sys/wait.h>
  193 #endif
  194 
  195 #ifdef OS2
  196 #define INCL_DOS
  197 #define INCL_DOSERRORS
  198 #include <os2.h>
  199 #endif
  200 
  201 /* header files for PATH_MAX, _POSIX_PATH_MAX */
  202 #if APR_HAVE_LIMITS_H
  203 #include <limits.h>
  204 #else
  205 #if APR_HAVE_SYS_SYSLIMITS_H
  206 #include <sys/syslimits.h>
  207 #endif
  208 #endif
  209 
  210 /* __APPLE__ is now the official pre-defined macro for macOS */
  211 #ifdef __APPLE__
  212 #undef DARWIN
  213 #undef DARWIN_10
  214 #define DARWIN
  215 #define DARWIN_10
  216 #endif /* __APPLE__ */
  217 
  218 #ifdef __cplusplus
  219 extern "C" {
  220 #endif
  221 
  222 /**
  223  * @addtogroup apr_platform
  224  * @ingroup APR 
  225  * @{
  226  */
  227 
  228 #define APR_HAVE_SHMEM_MMAP_TMP     @havemmaptmp@
  229 #define APR_HAVE_SHMEM_MMAP_SHM     @havemmapshm@
  230 #define APR_HAVE_SHMEM_MMAP_ZERO    @havemmapzero@
  231 #define APR_HAVE_SHMEM_SHMGET_ANON  @haveshmgetanon@
  232 #define APR_HAVE_SHMEM_SHMGET       @haveshmget@
  233 #define APR_HAVE_SHMEM_MMAP_ANON    @havemmapanon@
  234 #define APR_HAVE_SHMEM_BEOS         @havebeosarea@
  235 
  236 #define APR_USE_SHMEM_MMAP_TMP     @usemmaptmp@
  237 #define APR_USE_SHMEM_MMAP_SHM     @usemmapshm@
  238 #define APR_USE_SHMEM_MMAP_ZERO    @usemmapzero@
  239 #define APR_USE_SHMEM_SHMGET_ANON  @useshmgetanon@
  240 #define APR_USE_SHMEM_SHMGET       @useshmget@
  241 #define APR_USE_SHMEM_MMAP_ANON    @usemmapanon@
  242 #define APR_USE_SHMEM_BEOS         @usebeosarea@
  243 
  244 #define APR_USE_FLOCK_SERIALIZE           @flockser@ 
  245 #define APR_USE_SYSVSEM_SERIALIZE         @sysvser@
  246 #define APR_USE_POSIXSEM_SERIALIZE        @posixser@
  247 #define APR_USE_FCNTL_SERIALIZE           @fcntlser@
  248 #define APR_USE_PROC_PTHREAD_SERIALIZE    @procpthreadser@ 
  249 #define APR_USE_PTHREAD_SERIALIZE         @pthreadser@ 
  250 
  251 #define APR_HAS_FLOCK_SERIALIZE           @hasflockser@
  252 #define APR_HAS_SYSVSEM_SERIALIZE         @hassysvser@
  253 #define APR_HAS_POSIXSEM_SERIALIZE        @hasposixser@
  254 #define APR_HAS_FCNTL_SERIALIZE           @hasfcntlser@
  255 #define APR_HAS_PROC_PTHREAD_SERIALIZE    @hasprocpthreadser@
  256 
  257 #define APR_PROCESS_LOCK_IS_GLOBAL        @proclockglobal@
  258 
  259 #define APR_HAVE_CORKABLE_TCP   @have_corkable_tcp@ 
  260 #define APR_HAVE_GETRLIMIT      @have_getrlimit@
  261 #define APR_HAVE_IN_ADDR        @have_in_addr@
  262 #define APR_HAVE_INET_ADDR      @have_inet_addr@
  263 #define APR_HAVE_INET_NETWORK   @have_inet_network@
  264 #define APR_HAVE_IPV6           @have_ipv6@
  265 #define APR_HAVE_SOCKADDR_UN    @have_sockaddr_un@
  266 #define APR_HAVE_MEMMOVE        @have_memmove@
  267 #define APR_HAVE_SETRLIMIT      @have_setrlimit@
  268 #define APR_HAVE_SIGACTION      @have_sigaction@
  269 #define APR_HAVE_SIGSUSPEND     @have_sigsuspend@
  270 #define APR_HAVE_SIGWAIT        @have_sigwait@
  271 #define APR_HAVE_SA_STORAGE     @have_sa_storage@
  272 #define APR_HAVE_STRCASECMP     @have_strcasecmp@
  273 #define APR_HAVE_STRDUP         @have_strdup@
  274 #define APR_HAVE_STRICMP        @have_stricmp@
  275 #define APR_HAVE_STRNCASECMP    @have_strncasecmp@
  276 #define APR_HAVE_STRNICMP       @have_strnicmp@
  277 #define APR_HAVE_STRSTR         @have_strstr@
  278 #define APR_HAVE_MEMCHR         @have_memchr@
  279 #define APR_HAVE_STRUCT_RLIMIT  @struct_rlimit@
  280 #define APR_HAVE_UNION_SEMUN    @have_union_semun@
  281 #define APR_HAVE_SCTP           @have_sctp@
  282 #define APR_HAVE_IOVEC          @have_iovec@
  283 
  284 /*  APR Feature Macros */
  285 #define APR_HAS_SHARED_MEMORY     @sharedmem@
  286 #define APR_HAS_THREADS           @threads@
  287 #define APR_HAS_SENDFILE          @sendfile@
  288 #define APR_HAS_MMAP              @mmap@
  289 #define APR_HAS_FORK              @fork@
  290 #define APR_HAS_RANDOM            @rand@
  291 #define APR_HAS_OTHER_CHILD       @oc@
  292 #define APR_HAS_DSO               @aprdso@
  293 #define APR_HAS_SO_ACCEPTFILTER   @acceptfilter@
  294 #define APR_HAS_UNICODE_FS        @have_unicode_fs@
  295 #define APR_HAS_PROC_INVOKED      @have_proc_invoked@
  296 #define APR_HAS_USER              @apr_has_user@
  297 #define APR_HAS_LARGE_FILES       @aprlfs@
  298 #define APR_HAS_XTHREAD_FILES     @apr_has_xthread_files@
  299 #define APR_HAS_OS_UUID           @osuuid@
  300 #define APR_HAS_TIMEDLOCKS        @apr_has_timedlocks@
  301 
  302 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
  303 
  304 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  305  * to poll on files/pipes.
  306  */
  307 #define APR_FILES_AS_SOCKETS      @file_as_socket@
  308 
  309 /* This macro indicates whether or not EBCDIC is the native character set.
  310  */
  311 #define APR_CHARSET_EBCDIC        @apr_charset_ebcdic@
  312 
  313 /* If we have a TCP implementation that can be "corked", what flag
  314  * do we use?
  315  */
  316 #define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
  317 
  318 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  319 */
  320 #define APR_TCP_NODELAY_INHERITED @tcp_nodelay_inherited@
  321 
  322 /* Is the O_NONBLOCK flag inherited from listening sockets?
  323 */
  324 #define APR_O_NONBLOCK_INHERITED @o_nonblock_inherited@
  325 
  326 /* Typedefs that APR needs. */
  327 
  328 typedef  unsigned char           apr_byte_t;
  329 
  330 typedef  @short_value@           apr_int16_t;
  331 typedef  unsigned @short_value@  apr_uint16_t;
  332 
  333 typedef  @int_value@             apr_int32_t;
  334 typedef  unsigned @int_value@    apr_uint32_t;
  335 
  336 #define APR_SIZEOF_VOIDP @voidp_size@
  337 
  338 /*
  339  * Darwin 10's default compiler (gcc42) builds for both 64 and
  340  * 32 bit architectures unless specifically told not to.
  341  * In those cases, we need to override types depending on how
  342  * we're being built at compile time.
  343  * NOTE: This is an ugly work-around for Darwin's
  344  * concept of universal binaries, a single package
  345  * (executable, lib, etc...) which contains both 32
  346  * and 64 bit versions. The issue is that if APR is
  347  * built universally, if something else is compiled
  348  * against it, some bit sizes will depend on whether
  349  * it is 32 or 64 bit. This is determined by the __LP64__
  350  * flag. Since we need to support both, we have to
  351  * handle OS X unqiuely.
  352  */
  353 #ifdef DARWIN_10
  354 #undef APR_SIZEOF_VOIDP
  355 #undef APR_INT64_C
  356 #undef APR_UINT64_C
  357 #ifdef __LP64__
  358  typedef  long            apr_int64_t;
  359  typedef  unsigned long   apr_uint64_t;
  360  #define APR_SIZEOF_VOIDP     8
  361  #define APR_INT64_C(v)   (v ## L)
  362  #define APR_UINT64_C(v)  (v ## UL)
  363 #else
  364  typedef  long long            apr_int64_t;
  365  typedef  unsigned long long   apr_uint64_t;
  366  #define APR_SIZEOF_VOIDP     4
  367  #define APR_INT64_C(v)   (v ## LL)
  368  #define APR_UINT64_C(v)  (v ## ULL)
  369 #endif
  370 #else
  371  typedef  @int64_value@           apr_int64_t;
  372  typedef  @uint64_value@          apr_uint64_t;
  373 
  374  /* Mechanisms to properly type numeric literals */
  375  @int64_literal@
  376  @uint64_literal@
  377 #endif
  378 
  379 typedef  @size_t_value@          apr_size_t;
  380 typedef  @ssize_t_value@         apr_ssize_t;
  381 typedef  @off_t_value@           apr_off_t;
  382 typedef  @socklen_t_value@       apr_socklen_t;
  383 typedef  @ino_t_value@           apr_ino_t;
  384 
  385 #if APR_SIZEOF_VOIDP == 8
  386 typedef  apr_uint64_t            apr_uintptr_t;
  387 #else
  388 typedef  apr_uint32_t            apr_uintptr_t;
  389 #endif
  390 
  391 /* Are we big endian? */
  392 #define APR_IS_BIGENDIAN    @bigendian@
  393 
  394 #ifdef INT16_MIN
  395 #define APR_INT16_MIN   INT16_MIN
  396 #else
  397 #define APR_INT16_MIN   (-0x7fff - 1)
  398 #endif
  399 
  400 #ifdef INT16_MAX
  401 #define APR_INT16_MAX  INT16_MAX
  402 #else
  403 #define APR_INT16_MAX   (0x7fff)
  404 #endif
  405 
  406 #ifdef UINT16_MAX
  407 #define APR_UINT16_MAX  UINT16_MAX
  408 #else
  409 #define APR_UINT16_MAX  (0xffff)
  410 #endif
  411 
  412 #ifdef INT32_MIN
  413 #define APR_INT32_MIN   INT32_MIN
  414 #else
  415 #define APR_INT32_MIN   (-0x7fffffff - 1)
  416 #endif
  417 
  418 #ifdef INT32_MAX
  419 #define APR_INT32_MAX  INT32_MAX
  420 #else
  421 #define APR_INT32_MAX  0x7fffffff
  422 #endif
  423 
  424 #ifdef UINT32_MAX
  425 #define APR_UINT32_MAX  UINT32_MAX
  426 #else
  427 #define APR_UINT32_MAX  (0xffffffffU)
  428 #endif
  429 
  430 #ifdef INT64_MIN
  431 #define APR_INT64_MIN   INT64_MIN
  432 #else
  433 #define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)
  434 #endif
  435 
  436 #ifdef INT64_MAX
  437 #define APR_INT64_MAX   INT64_MAX
  438 #else
  439 #define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)
  440 #endif
  441 
  442 #ifdef UINT64_MAX
  443 #define APR_UINT64_MAX  UINT64_MAX
  444 #else
  445 #define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)
  446 #endif
  447 
  448 #define APR_SIZE_MAX    (~((apr_size_t)0))
  449 
  450 
  451 /* Definitions that APR programs need to work properly. */
  452 
  453 /**
  454  * APR public API wrap for C++ compilers.
  455  */
  456 #ifdef __cplusplus
  457 #define APR_BEGIN_DECLS     extern "C" {
  458 #define APR_END_DECLS       }
  459 #else
  460 #define APR_BEGIN_DECLS
  461 #define APR_END_DECLS
  462 #endif
  463 
  464 /** 
  465  * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, 
  466  * so that they follow the platform's calling convention.
  467  * <PRE>
  468  *
  469  * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
  470  *
  471  * </PRE>
  472  */
  473 #define APR_THREAD_FUNC       @apr_thread_func@
  474 
  475 #if defined(DOXYGEN) || !defined(WIN32)
  476 
  477 /**
  478  * The public APR functions are declared with APR_DECLARE(), so they may
  479  * use the most appropriate calling convention.  Public APR functions with 
  480  * variable arguments must use APR_DECLARE_NONSTD().
  481  *
  482  * @remark Both the declaration and implementations must use the same macro.
  483  *
  484  * <PRE>
  485  * APR_DECLARE(rettype) apr_func(args)
  486  * </PRE>
  487  * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  488  * @remark Note that when APR compiles the library itself, it passes the 
  489  * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) 
  490  * to export public symbols from the dynamic library build.\n
  491  * The user must define the APR_DECLARE_STATIC when compiling to target
  492  * the static APR library on some platforms (e.g. Win32.)  The public symbols 
  493  * are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
  494  * By default, compiling an application and including the APR public
  495  * headers, without defining APR_DECLARE_STATIC, will prepare the code to be
  496  * linked to the dynamic library.
  497  */
  498 #define APR_DECLARE(type)            type 
  499 
  500 /**
  501  * The public APR functions using variable arguments are declared with 
  502  * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  503  * @see APR_DECLARE @see APR_DECLARE_DATA
  504  * @remark Both the declaration and implementations must use the same macro.
  505  * <PRE>
  506  *
  507  * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
  508  *
  509  * </PRE>
  510  */
  511 #define APR_DECLARE_NONSTD(type)     type
  512 
  513 /**
  514  * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
  515  * This assures the appropriate indirection is invoked at compile time.
  516  * @see APR_DECLARE @see APR_DECLARE_NONSTD
  517  * @remark Note that the declaration and implementations use different forms,
  518  * but both must include the macro.
  519  * 
  520  * <PRE>
  521  *
  522  * extern APR_DECLARE_DATA type apr_variable;\n
  523  * APR_DECLARE_DATA type apr_variable = value;
  524  *
  525  * </PRE>
  526  */
  527 #define APR_DECLARE_DATA
  528 
  529 #elif defined(APR_DECLARE_STATIC)
  530 #define APR_DECLARE(type)            type __stdcall
  531 #define APR_DECLARE_NONSTD(type)     type __cdecl
  532 #define APR_DECLARE_DATA
  533 #elif defined(APR_DECLARE_EXPORT)
  534 #define APR_DECLARE(type)            __declspec(dllexport) type __stdcall
  535 #define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl
  536 #define APR_DECLARE_DATA             __declspec(dllexport)
  537 #else
  538 #define APR_DECLARE(type)            __declspec(dllimport) type __stdcall
  539 #define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl
  540 #define APR_DECLARE_DATA             __declspec(dllimport)
  541 #endif
  542 
  543 /* Define APR_SSIZE_T_FMT.  
  544  * If ssize_t is an integer we define it to be "d",
  545  * if ssize_t is a long int we define it to be "ld",
  546  * if ssize_t is neither we declare an error here.
  547  * I looked for a better way to define this here, but couldn't find one, so
  548  * to find the logic for this definition search for "ssize_t_fmt" in
  549  * configure.in.
  550  */
  551 
  552 @ssize_t_fmt@
  553 
  554 /* And APR_SIZE_T_FMT */
  555 @size_t_fmt@
  556 
  557 /* And APR_OFF_T_FMT */
  558 @off_t_fmt@
  559 
  560 /* And APR_PID_T_FMT */
  561 @pid_t_fmt@
  562 
  563 /* And APR_INT64_T_FMT */
  564 @int64_t_fmt@
  565 
  566 /* And APR_UINT64_T_FMT */
  567 @uint64_t_fmt@
  568 
  569 /* And APR_UINT64_T_HEX_FMT */
  570 @uint64_t_hex_fmt@
  571 
  572 /*
  573  * Ensure we work with universal binaries on Darwin
  574  */
  575 #ifdef DARWIN_10
  576 
  577 #undef APR_HAS_LARGE_FILES
  578 #undef APR_SIZEOF_VOIDP
  579 #undef APR_INT64_T_FMT
  580 #undef APR_UINT64_T_FMT
  581 #undef APR_UINT64_T_HEX_FMT
  582 
  583 #ifdef __LP64__
  584  #define APR_HAS_LARGE_FILES  0
  585  #define APR_SIZEOF_VOIDP     8
  586  #define APR_INT64_T_FMT      "ld"
  587  #define APR_UINT64_T_FMT     "lu"
  588  #define APR_UINT64_T_HEX_FMT "lx"
  589 #else
  590  #define APR_HAS_LARGE_FILES  1
  591  #define APR_SIZEOF_VOIDP     4
  592  #define APR_INT64_T_FMT      "lld"
  593  #define APR_UINT64_T_FMT     "llu"
  594  #define APR_UINT64_T_HEX_FMT "llx"
  595 #endif
  596 
  597 #undef APR_IS_BIGENDIAN
  598 #ifdef __BIG_ENDIAN__
  599  #define APR_IS_BIGENDIAN   1
  600 #else
  601  #define APR_IS_BIGENDIAN   0
  602 #endif
  603 
  604 #undef APR_OFF_T_FMT
  605 #define APR_OFF_T_FMT "lld"
  606 
  607 #endif /* DARWIN_10 */
  608 
  609 /* Does the proc mutex lock threads too */
  610 #define APR_PROC_MUTEX_IS_GLOBAL      @proc_mutex_is_global@
  611 
  612 /* Local machine definition for console and log output. */
  613 #define APR_EOL_STR              "@eolstr@"
  614 
  615 #if APR_HAVE_SYS_WAIT_H
  616 #ifdef WEXITSTATUS
  617 #define apr_wait_t       int
  618 #else
  619 #define apr_wait_t       union wait
  620 #define WEXITSTATUS(status)    (int)((status).w_retcode)
  621 #define WTERMSIG(status)       (int)((status).w_termsig)
  622 #endif /* !WEXITSTATUS */
  623 #elif defined(__MINGW32__)
  624 typedef int apr_wait_t;
  625 #endif /* HAVE_SYS_WAIT_H */
  626 
  627 #if defined(PATH_MAX)
  628 #define APR_PATH_MAX       PATH_MAX
  629 #elif defined(_POSIX_PATH_MAX)
  630 #define APR_PATH_MAX       _POSIX_PATH_MAX
  631 #else
  632 #error no decision has been made on APR_PATH_MAX for your platform
  633 #endif
  634 
  635 #define APR_DSOPATH "@shlibpath_var@"
  636 
  637 /** @} */
  638 
  639 /* Definitions that only Win32 programs need to compile properly. */
  640 
  641 /* XXX These simply don't belong here, perhaps in apr_portable.h
  642  * based on some APR_HAVE_PID/GID/UID?
  643  */
  644 #ifdef __MINGW32__
  645 #ifndef __GNUC__
  646 typedef  int         pid_t;
  647 #endif
  648 typedef  int         uid_t;
  649 typedef  int         gid_t;
  650 #endif
  651 
  652 #ifdef __cplusplus
  653 }
  654 #endif
  655 
  656 #endif /* APR_H */