From f79d3e15d171a19565a0a106f24540d5f7ae5d93 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 31 Aug 2015 14:43:15 -0700 Subject: The official #define for 32-bit and 64-bit Windows is _WIN32. It's _WIN32, with a leading underscore, not WIN32. See, for example: https://sourceforge.net/p/predef/wiki/OperatingSystems/ and https://msdn.microsoft.com/en-us/library/b0084kay.aspx *Some* environments may also define WIN32, but we shouldn't depend on that. --- addrtoname.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addrtoname.c') diff --git a/addrtoname.c b/addrtoname.c index f772801a..551ebb90 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -89,7 +89,7 @@ static struct hnamemem eprototable[HASHNAMESIZE]; static struct hnamemem dnaddrtable[HASHNAMESIZE]; static struct hnamemem ipxsaptable[HASHNAMESIZE]; -#if defined(INET6) && defined(WIN32) +#if defined(INET6) && defined(_WIN32) /* * fake gethostbyaddr for Win2k/XP * gethostbyaddr() returns incorrect value when AF_INET6 is passed @@ -127,7 +127,7 @@ win32_gethostbyaddr(const char *addr, int len, int type) } } #define gethostbyaddr win32_gethostbyaddr -#endif /* INET6 & WIN32 */ +#endif /* INET6 & _WIN32 */ #ifdef INET6 struct h6namemem { @@ -775,7 +775,7 @@ init_servarray(netdissect_options *ndo) } /* in libpcap.a (nametoaddr.c) */ -#if defined(WIN32) && !defined(USE_STATIC_LIBPCAP) +#if defined(_WIN32) && !defined(USE_STATIC_LIBPCAP) extern __declspec(dllimport) #else extern -- cgit v1.2.1