[or-cvs] r13377: Apparently, our windows code for detecting ipv6 structures h (tor/trunk/src/common)
nickm at seul.org
nickm at seul.org
Tue Feb 5 19:36:07 UTC 2008
Author: nickm
Date: 2008-02-05 14:36:06 -0500 (Tue, 05 Feb 2008)
New Revision: 13377
Modified:
tor/trunk/src/common/compat.h
Log:
Apparently, our windows code for detecting ipv6 structures has worked for a while. Remove the special-case, remove the related XXXX020s, and add useful comments instead.
Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h 2008-02-05 16:21:34 UTC (rev 13376)
+++ tor/trunk/src/common/compat.h 2008-02-05 19:36:06 UTC (rev 13377)
@@ -271,8 +271,11 @@
typedef int socklen_t;
#endif
-/* XXXX020 detect in6_addr correctly on ms_windows; this is a hack. */
-#if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(MS_WINDOWS)
+/* Define struct in6_addr on platforms that do not have it. Generally,
+ * these platforms are ones without IPv6 support, but we want to have
+ * a working in6_addr there anyway, so we can use it to parse IPv6
+ * addresses. */
+#if !defined(HAVE_STRUCT_IN6_ADDR)
struct in6_addr
{
union {
@@ -313,8 +316,9 @@
#define S6_ADDR16(x) ((uint16_t*)((char*)&(x).s6_addr))
#endif
-/* XXXX020 detect sockaddr_in6 correctly on ms_windows; this is also a hack. */
-#if !defined(HAVE_STRUCT_SOCKADDR_IN6) && !defined(MS_WINDOWS)
+/* Define struct sockaddr_in6 on platforms that do not have it. See notes
+ * on struct in6_addr. */
+#if !defined(HAVE_STRUCT_SOCKADDR_IN6)
struct sockaddr_in6 {
sa_family_t sin6_family;
uint16_t sin6_port;
More information about the tor-commits
mailing list