diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-05 19:36:06 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-05 19:36:06 +0000 |
commit | 54029559d7153286b9c4fb2ba31a7efacc65181e (patch) | |
tree | 15b148b479e80acef3ef306f4742c5b8b936430f /src/common/compat.h | |
parent | c397c64d15d2ec55c8997fa2cc75f84126eedea5 (diff) | |
download | tor-54029559d7153286b9c4fb2ba31a7efacc65181e.tar.gz tor-54029559d7153286b9c4fb2ba31a7efacc65181e.zip |
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.
svn:r13377
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index a94691d447..1ccfbe8a0b 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -271,8 +271,11 @@ int get_n_open_sockets(void); 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 @@ typedef uint16_t sa_family_t; #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; |