------------------------------------------------------------ revno: 13147 revision-id: squid3@treenet.co.nz-20140621041919-7e1ja64z6s6e0cdi parent: squid3@treenet.co.nz-20140616024905-gxoxh75e3ixt2hbh committer: Amos Jeffries branch nick: 3.4 timestamp: Fri 2014-06-20 22:19:19 -0600 message: Windows: fix various libip build issues * Missing include ws2tcpip.h for IPv6 definitions * Alternative IN6_ARE_ADDR_EQUAL definition required * 'byte' is a reserved / system defined type on Windows, resolve variable shadowing by renaming to ipbyte. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140621041919-7e1ja64z6s6e0cdi # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: 238f289c3a1eda70b8077f3fb0b2e355fcae15b7 # timestamp: 2014-06-21 04:24:57 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squid3@treenet.co.nz-20140616024905-\ # gxoxh75e3ixt2hbh # # Begin patch === modified file 'src/ip/Address.cc' --- src/ip/Address.cc 2014-04-18 18:43:35 +0000 +++ src/ip/Address.cc 2014-06-21 04:19:19 +0000 @@ -21,6 +21,15 @@ /* for inet_ntoa() */ #include #endif +#if HAVE_WS2TCPIP_H +// Windows IPv6 definitions +#include +#endif + +// some OS (ie WIndows) define IN6_ADDR_EQUAL instead +#if !defined(IN6_ARE_ADDR_EQUAL) && _SQUID_WINDOWS_ +#define IN6_ARE_ADDR_EQUAL IN6_ADDR_EQUAL +#endif /* Debugging only. Dump the address content when a fatal assert is encountered. */ #define IASSERT(a,b) \ @@ -35,7 +44,7 @@ int Ip::Address::cidr() const { - uint8_t shift,byte; + uint8_t shift,ipbyte; uint8_t bit,caught; int len = 0; const uint8_t *ptr= mSocketAddr_.sin6_addr.s6_addr; @@ -52,20 +61,20 @@ } for (; shift