[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev IPv6 fix for 2.8.4dev.9
From: |
sumikawa |
Subject: |
lynx-dev IPv6 fix for 2.8.4dev.9 |
Date: |
Mon, 04 Sep 2000 14:51:48 +0900 (JST) |
Hello.
lynx-2.8.4dev9 with IPv6 supporting is not buldable on some OSs which
have 'sockaddr.sa_len' such as FreeBSD-4.1.
This caused by that 'SIN6_LEN' checking is put on before including
'netinet/in.h' in WWW/Library/Implementation/www_tcp.h
I've move the IPv6 block to the last of www_tcp.h and checked it works
well. The following is the quick fix. Could you review and merge it?
Thanks,
---
Munechika SUMIKAWA @ KAME Project / FreeBSD.org
---------------------------------------------------------
--- WWW/Library/Implementation/www_tcp.h.orig Fri Aug 25 10:30:11 2000
+++ WWW/Library/Implementation/www_tcp.h Mon Sep 4 11:03:13 2000
@@ -56,29 +56,6 @@
#define INVSOC (-1) /* Unix invalid socket */
/* NB: newer libwww has something different for Windows */
-/* IPv6 support */
-#if defined(HAVE_GETADDRINFO) && defined(HAVE_GAI_STRERROR) &&
defined(ENABLE_IPV6)
-# define INET6
-#endif /* HAVE_GETADDRINFO && HAVE_GAI_STRERROR && ENABLE_IPV6 */
-
-#if !defined(__MINGW32__)
-#ifdef INET6
-typedef struct sockaddr_storage SockA; /* See netinet/in.h */
-#else
-typedef struct sockaddr_in SockA; /* See netinet/in.h */
-#endif /* INET6 */
-#endif
-
-#ifdef INET6
-#ifdef SIN6_LEN
-#define SOCKADDR_LEN(soc_address) ((struct sockaddr *)&soc_address)->sa_len
-#else
-#define SOCKADDR_LEN(soc_address) SA_LEN((struct sockaddr *)&soc_address)
-#endif /* SIN6_LEN */
-#else
-#define SOCKADDR_LEN(soc_address) sizeof(soc_address)
-#endif /* INET6 */
-
#ifndef VMS
#include <sys/types.h>
@@ -803,5 +780,28 @@
#else
#define set_errno(value) /* we do not know how */
#endif
+
+/* IPv6 support */
+#if defined(HAVE_GETADDRINFO) && defined(HAVE_GAI_STRERROR) &&
defined(ENABLE_IPV6)
+# define INET6
+#endif /* HAVE_GETADDRINFO && HAVE_GAI_STRERROR && ENABLE_IPV6 */
+
+#if !defined(__MINGW32__)
+#ifdef INET6
+typedef struct sockaddr_storage SockA; /* See netinet/in.h */
+#else
+typedef struct sockaddr_in SockA; /* See netinet/in.h */
+#endif /* INET6 */
+#endif
+
+#ifdef INET6
+#ifdef SIN6_LEN
+#define SOCKADDR_LEN(soc_address) ((struct sockaddr *)&soc_address)->sa_len
+#else
+#define SOCKADDR_LEN(soc_address) SA_LEN((struct sockaddr *)&soc_address)
+#endif /* SIN6_LEN */
+#else
+#define SOCKADDR_LEN(soc_address) sizeof(soc_address)
+#endif /* INET6 */
#endif /* TCP_H */
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev IPv6 fix for 2.8.4dev.9,
sumikawa <=