[or-cvs] r10963: Change "IN_ADDR" macro to "IN4_ADDR" in an attempt to fix mi (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Sun Jul 29 02:55:25 UTC 2007


Author: nickm
Date: 2007-07-28 22:55:24 -0400 (Sat, 28 Jul 2007)
New Revision: 10963

Modified:
   tor/trunk/
   tor/trunk/src/common/compat.h
   tor/trunk/src/common/util.c
Log:
 r13964 at catbus:  nickm | 2007-07-28 22:55:10 -0400
 Change "IN_ADDR" macro to "IN4_ADDR" in an attempt to fix mingw compilation



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13964] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h	2007-07-29 02:55:21 UTC (rev 10962)
+++ tor/trunk/src/common/compat.h	2007-07-29 02:55:24 UTC (rev 10963)
@@ -319,7 +319,7 @@
 static INLINE uint32_t IPV4IPh(const tor_addr_t *a);
 static INLINE uint32_t IPV4MAPh(const tor_addr_t *a);
 static INLINE uint16_t IN_FAMILY(const tor_addr_t *a);
-static INLINE const struct in_addr *IN_ADDR(const tor_addr_t *a);
+static INLINE const struct in_addr *IN4_ADDR(const tor_addr_t *a);
 static INLINE const struct in6_addr *IN6_ADDR(const tor_addr_t *a);
 static INLINE uint16_t IN_PORT(const tor_addr_t *a);
 
@@ -344,7 +344,7 @@
   return a->sa.sin_family;
 }
 static INLINE const struct in_addr *
-IN_ADDR(const tor_addr_t *a)
+IN4_ADDR(const tor_addr_t *a)
 {
   return &a->sa.sin_addr;
 }

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2007-07-29 02:55:21 UTC (rev 10962)
+++ tor/trunk/src/common/util.c	2007-07-29 02:55:24 UTC (rev 10963)
@@ -2260,7 +2260,7 @@
 #else
   if (v_family == AF_INET6 && v4map) {
     v_family = AF_INET;
-    IN_ADDR(addr_out).s_addr = IN6_ADDR(addr_out).s6_addr32[3];
+    IN4_ADDR(addr_out).s_addr = IN6_ADDR(addr_out).s6_addr32[3];
   }
 #endif
 */
@@ -2391,7 +2391,7 @@
         return 1;
       return 0;
     case AF_INET:
-      if (!IN_ADDR(addr)->s_addr)
+      if (!IN4_ADDR(addr)->s_addr)
         return 1;
       return 0;
     default:
@@ -2556,7 +2556,7 @@
   tor_assert(addr && dest);
 
   if (IN_FAMILY(addr) == AF_INET) {
-    return tor_inet_ntop(AF_INET, IN_ADDR(addr), dest, len);
+    return tor_inet_ntop(AF_INET, IN4_ADDR(addr), dest, len);
   } else if (IN_FAMILY(addr) == AF_INET6) {
     return tor_inet_ntop(AF_INET6, IN6_ADDR(addr), dest, len);
   } else {



More information about the tor-commits mailing list