wrowe 2002/10/11 22:29:19
Modified: include apr.hw
Log:
Toggling APR_HAVE_IPV6 to 1 simply works now.
Revision Changes Path
1.101 +15 -1 apr/include/apr.hw
Index: apr.hw
===================================================================
RCS file: /home/cvs/apr/include/apr.hw,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- apr.hw 3 Aug 2002 22:06:59 -0000 1.100
+++ apr.hw 12 Oct 2002 05:29:19 -0000 1.101
@@ -341,10 +341,24 @@
typedef int uid_t;
typedef int gid_t;
-
/* Mechanisms to properly type numeric literals */
#define APR_INT64_C(val) (val##i64)
+
+
+#if APR_HAVE_IPV6
+#include <ws2tcpip.h>
+
+/* Win32 does it's own thing. Again. */
+#define in6_addr in_addr6
+
+/* Appears in later flavors, not the originals. */
+#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
/* Definitions that APR programs need to work properly. */