apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r661377 - /apr/apr/branches/1.3.x/include/apr.hw
Date Thu, 29 May 2008 16:10:47 GMT
Author: wrowe
Date: Thu May 29 09:10:46 2008
New Revision: 661377

URL: http://svn.apache.org/viewvc?rev=661377&view=rev
Log:
Refactor and update apr.hw to apr.h.in contents.

Backports: r661375

Modified:
    apr/apr/branches/1.3.x/include/apr.hw

Modified: apr/apr/branches/1.3.x/include/apr.hw
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/include/apr.hw?rev=661377&r1=661376&r2=661377&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/include/apr.hw (original)
+++ apr/apr/branches/1.3.x/include/apr.hw Thu May 29 09:10:46 2008
@@ -107,9 +107,15 @@
 #endif /* !_WINDOWS_ */
 
 /**
+ * @defgroup APR Apache Portability Runtime library
+ * @{
+ */
+/**
  * @defgroup apr_platform Platform Definitions
- * @ingroup APR 
  * @{
+ * @warning
+ * <strong><em>The actual values of macros and typedefs on this page<br>
+ * are platform specific and should NOT be relied upon!</em></strong>
  */
 
 #define APR_INLINE __inline
@@ -134,6 +140,7 @@
 #define APR_HAVE_NETINET_SCTP_UIO_H 0
 #define APR_HAVE_NETINET_TCP_H  0
 #define APR_HAVE_PTHREAD_H      0
+#define APR_HAVE_SEMAPHORE_H    0
 #define APR_HAVE_SIGNAL_H       1
 #define APR_HAVE_STDARG_H       1
 #define APR_HAVE_STDINT_H       0
@@ -141,6 +148,7 @@
 #define APR_HAVE_STDLIB_H       1
 #define APR_HAVE_STRING_H       1
 #define APR_HAVE_STRINGS_H      0
+#define APR_HAVE_SYS_IOCTL_H    0
 #define APR_HAVE_SYS_SENDFILE_H 0
 #define APR_HAVE_SYS_SIGNAL_H   0
 #define APR_HAVE_SYS_SOCKET_H   0
@@ -149,11 +157,12 @@
 #define APR_HAVE_SYS_TIME_H     0
 #define APR_HAVE_SYS_TYPES_H    1
 #define APR_HAVE_SYS_UIO_H      0
+#define APR_HAVE_SYS_UN_H       0
 #define APR_HAVE_SYS_WAIT_H     0
+#define APR_HAVE_TIME_H         1
 #define APR_HAVE_UNISTD_H       0
 #define APR_HAVE_STDDEF_H       1
 #define APR_HAVE_PROCESS_H      1
-#define APR_HAVE_TIME_H         1
 #else
 #define APR_HAVE_ARPA_INET_H    0
 #define APR_HAVE_CONIO_H        0
@@ -166,8 +175,11 @@
 #define APR_HAVE_LIMITS_H       0
 #define APR_HAVE_NETDB_H        0
 #define APR_HAVE_NETINET_IN_H   0
+#define APR_HAVE_NETINET_SCTP_H 0
+#define APR_HAVE_NETINET_SCTP_UIO_H 0
 #define APR_HAVE_NETINET_TCP_H  0
 #define APR_HAVE_PTHREAD_H      0
+#define APR_HAVE_SEMAPHORE_H    0
 #define APR_HAVE_SIGNAL_H       0
 #define APR_HAVE_STDARG_H       0
 #define APR_HAVE_STDINT_H       0
@@ -175,21 +187,80 @@
 #define APR_HAVE_STDLIB_H       1
 #define APR_HAVE_STRING_H       1
 #define APR_HAVE_STRINGS_H      0
+#define APR_HAVE_SYS_IOCTL_H    0
 #define APR_HAVE_SYS_SENDFILE_H 0
 #define APR_HAVE_SYS_SIGNAL_H   0
 #define APR_HAVE_SYS_SOCKET_H   0
+#define APR_HAVE_SYS_SOCKIO_H   0
 #define APR_HAVE_SYS_SYSLIMITS_H 0
 #define APR_HAVE_SYS_TIME_H     0
 #define APR_HAVE_SYS_TYPES_H    0
 #define APR_HAVE_SYS_UIO_H      0
+#define APR_HAVE_SYS_UN_H       0
 #define APR_HAVE_SYS_WAIT_H     0
+#define APR_HAVE_TIME_H         0
 #define APR_HAVE_UNISTD_H       0
 #define APR_HAVE_STDDEF_H       0
 #define APR_HAVE_PROCESS_H      0
-#define APR_HAVE_TIME_H         0
 #endif
 
+/** @} */
+/** @} */
+
+/* We don't include our conditional headers within the doxyblocks 
+ * or the extern "C" namespace 
+ */
+
+#if APR_HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if APR_HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if APR_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if APR_HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#if APR_HAVE_TIME_H
+#include <time.h>
+#endif
+#if APR_HAVE_PROCESS_H
+#include <process.h>
+#endif
+#if APR_HAVE_IPV6
+#include <ws2tcpip.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup apr_platform
+ * @ingroup APR 
+ * @{
+ */
+
+#define APR_HAVE_SHMEM_MMAP_TMP     0
+#define APR_HAVE_SHMEM_MMAP_SHM     0
+#define APR_HAVE_SHMEM_MMAP_ZERO    0
+#define APR_HAVE_SHMEM_SHMGET_ANON  0
+#define APR_HAVE_SHMEM_SHMGET       0
+#define APR_HAVE_SHMEM_MMAP_ANON    0
+#define APR_HAVE_SHMEM_BEOS         0
+
+#define APR_USE_SHMEM_MMAP_TMP     0
+#define APR_USE_SHMEM_MMAP_SHM     0
+#define APR_USE_SHMEM_MMAP_ZERO    0
+#define APR_USE_SHMEM_SHMGET_ANON  0
+#define APR_USE_SHMEM_SHMGET       0
+#define APR_USE_SHMEM_MMAP_ANON    0
+#define APR_USE_SHMEM_BEOS         0
+
 #define APR_USE_FLOCK_SERIALIZE           0 
+#define APR_USE_POSIXSEM_SERIALIZE        0
 #define APR_USE_SYSVSEM_SERIALIZE         0
 #define APR_USE_FCNTL_SERIALIZE           0
 #define APR_USE_PROC_PTHREAD_SERIALIZE    0 
@@ -197,28 +268,19 @@
 
 #define APR_HAS_FLOCK_SERIALIZE           0
 #define APR_HAS_SYSVSEM_SERIALIZE         0
+#define APR_HAS_POSIXSEM_SERIALIZE        0
 #define APR_HAS_FCNTL_SERIALIZE           0
 #define APR_HAS_PROC_PTHREAD_SERIALIZE    0
-#define APR_HAS_RWLOCK_SERIALIZE          0
-
-#define APR_HAS_LOCK_CREATE_NP            0
 
 #define APR_PROCESS_LOCK_IS_GLOBAL        0
 
-#define APR_USES_ANONYMOUS_SHM            0
-#define APR_USES_FILEBASED_SHM            0
-#define APR_USES_KEYBASED_SHM             0
-
-#define APR_FILE_BASED_SHM      0
-#define APR_MEM_BASED_SHM       0
-
 #define APR_HAVE_CORKABLE_TCP   0
 #define APR_HAVE_GETRLIMIT      0
 #define APR_HAVE_ICONV          0
 #define APR_HAVE_IN_ADDR        1
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
-#define APR_HAVE_IPV6           0
+#define APR_HAVE_IPV6           1
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0
@@ -232,55 +294,16 @@
 #define APR_HAVE_STRUCT_RLIMIT  0
 #define APR_HAVE_UNION_SEMUN    0
 #define APR_HAVE_SCTP           0
+#define APR_HAVE_IOVEC          0
 
 #ifndef _WIN32_WCE
 #define APR_HAVE_STRICMP        1
 #define APR_HAVE_STRNICMP       1
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1
 #else
 #define APR_HAVE_STRICMP        0
 #define APR_HAVE_STRNICMP       0
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
-#endif
-
-/** @} */
-
-/* We don't include our conditional headers within the doxyblocks 
- * or the extern "C" namespace 
- */
-
-#if APR_HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if APR_HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if APR_HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if APR_HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-#if APR_HAVE_TIME_H
-#include <time.h>
-#endif
-#if APR_HAVE_PROCESS_H
-#include <process.h>
-#endif
-#if APR_HAVE_IPV6
-#include <ws2tcpip.h>
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @addtogroup apr_platform
- * @ingroup APR 
- * @{
- */
-
 /*  APR Feature Macros */
 #define APR_HAS_SHARED_MEMORY     1
 #define APR_HAS_THREADS           1
@@ -292,20 +315,24 @@
 #define APR_HAS_SO_ACCEPTFILTER   0
 #define APR_HAS_UNICODE_FS        1
 #define APR_HAS_PROC_INVOKED      1
+#define APR_HAS_OS_UUID           1
+
 #ifndef _WIN32_WCE
 #define APR_HAS_SENDFILE          1
 #define APR_HAS_USER              1
 #define APR_HAS_LARGE_FILES       1
 #define APR_HAS_XTHREAD_FILES     1
+#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1
 #else
 #define APR_HAS_SENDFILE          0
 #define APR_HAS_USER              0
 #define APR_HAS_LARGE_FILES       0
 #define APR_HAS_XTHREAD_FILES     0
+#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
 #endif
-#define APR_HAS_OS_UUID           1
 
-/* Win32 cannot poll [just yet] on files/pipes.
+/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
+ * to poll on files/pipes.
  */
 #define APR_FILES_AS_SOCKETS      0
 
@@ -313,6 +340,11 @@
  */
 #define APR_CHARSET_EBCDIC        0
 
+/* If we have a TCP implementation that can be "corked", what flag
+ * do we use?
+ */
+#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
+
 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  */
 #define APR_TCP_NODELAY_INHERITED 1
@@ -348,10 +380,6 @@
 typedef  int         apr_socklen_t;
 typedef  apr_uint64_t      apr_ino_t;
 
-/* Are we big endian? */
-/* XXX: Fatal assumption on Alpha platforms */
-#define APR_IS_BIGENDIAN	0
-
 #ifdef WIN64
 #define APR_SIZEOF_VOIDP   8
 #else
@@ -364,15 +392,9 @@
 typedef  apr_uint32_t            apr_uintptr_t;
 #endif
 
-
-/* XXX These simply don't belong here, perhaps in apr_portable.h
- * based on some APR_HAVE_PID/GID/UID?
- */
-#ifndef __GNUC__
-typedef  int         pid_t;
-#endif
-typedef  int         uid_t;
-typedef  int         gid_t;
+/* Are we big endian? */
+/* XXX: Fatal assumption on Alpha platforms */
+#define APR_IS_BIGENDIAN	0
 
 /* Mechanisms to properly type numeric literals */
 
@@ -440,21 +462,6 @@
 
 #define APR_SIZE_MAX    (~((apr_size_t)0))
 
-#if APR_HAVE_IPV6
-
-/* Appears in later flavors, not the originals. */
-#ifndef in_addr6
-#define  in6_addr    in_addr6
-#endif
-
-#ifndef WS2TCPIP_INLINE
-#define IN6_IS_ADDR_V4MAPPED(a) \
-    (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \
-     && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
-#endif
-
-#endif /* APR_HAS_IPV6 */
-
 /* Definitions that APR programs need to work properly. */
 
 /**
@@ -471,9 +478,11 @@
 /** 
  * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, 
  * so that they follow the platform's calling convention.
- * @example
- */
-/** void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
+ * <PRE>
+ *
+ * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);
+ *
+ * </PRE>
  */
 #define APR_THREAD_FUNC  __stdcall
 
@@ -486,9 +495,10 @@
  * variable arguments must use APR_DECLARE_NONSTD().
  *
  * @remark Both the declaration and implementations must use the same macro.
- * @example
- */
-/** APR_DECLARE(rettype) apr_func(args)
+ *
+ * <PRE>
+ * APR_DECLARE(rettype) apr_func(args)
+ * </PRE>
  * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
  * @remark Note that when APR compiles the library itself, it passes the 
  * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) 
@@ -507,9 +517,11 @@
  * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
  * @see APR_DECLARE @see APR_DECLARE_DATA
  * @remark Both the declaration and implementations must use the same macro.
- * @example
- */
-/** APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ * <PRE>
+ *
+ * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ *
+ * </PRE>
  */
 #define APR_DECLARE_NONSTD(type)     type
 
@@ -519,10 +531,13 @@
  * @see APR_DECLARE @see APR_DECLARE_NONSTD
  * @remark Note that the declaration and implementations use different forms,
  * but both must include the macro.
- * @example
- */
-/** extern APR_DECLARE_DATA type apr_variable;\n
+ * 
+ * <PRE>
+ *
+ * extern APR_DECLARE_DATA type apr_variable;\n
  * APR_DECLARE_DATA type apr_variable = value;
+ *
+ * </PRE>
  */
 #define APR_DECLARE_DATA
 
@@ -542,10 +557,10 @@
 
 #ifdef WIN64
 #define APR_SSIZE_T_FMT          "I64d"
-#define APR_SIZE_T_FMT           "I64d"
+#define APR_SIZE_T_FMT           "I64u"
 #else
 #define APR_SSIZE_T_FMT          "d"
-#define APR_SIZE_T_FMT           "d"
+#define APR_SIZE_T_FMT           "u"
 #endif
 
 #if APR_HAS_LARGE_FILES
@@ -560,21 +575,13 @@
 #define APR_UINT64_T_FMT         "I64u"
 #define APR_UINT64_T_HEX_FMT     "I64x"
 
-/* Local machine definition for console and log output. */
-#define APR_EOL_STR              "\r\n"
-
 /* No difference between PROC and GLOBAL mutex */
 #define APR_PROC_MUTEX_IS_GLOBAL      1
 
-typedef int apr_wait_t;
-
-/* struct iovec is needed to emulate Unix writev */
-#define APR_HAVE_IOVEC 0
+/* Local machine definition for console and log output. */
+#define APR_EOL_STR              "\r\n"
 
-/* Nasty Win32 .h ommissions we really need */
-#define STDIN_FILENO  0
-#define STDOUT_FILENO 1
-#define STDERR_FILENO 2
+typedef int apr_wait_t;
 
 #if APR_HAS_UNICODE_FS
 /* An arbitrary size that is digestable. True max is a bit less than 32000 */
@@ -587,6 +594,37 @@
 
 /** @} */
 
+/* Definitions that only Win32 programs need to compile properly. */
+
+/* XXX These simply don't belong here, perhaps in apr_portable.h
+ * based on some APR_HAVE_PID/GID/UID?
+ */
+#ifndef __GNUC__
+typedef  int         pid_t;
+#endif
+typedef  int         uid_t;
+typedef  int         gid_t;
+
+/* Win32 .h ommissions we really need */
+#define STDIN_FILENO  0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+#if APR_HAVE_IPV6
+
+/* Appears in later flavors, not the originals. */
+#ifndef in_addr6
+#define  in6_addr    in_addr6
+#endif
+
+#ifndef WS2TCPIP_INLINE
+#define IN6_IS_ADDR_V4MAPPED(a) \
+    (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \
+     && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
+#endif
+
+#endif /* APR_HAS_IPV6 */
+
 #ifdef __cplusplus
 }
 #endif



Mime
View raw message