From 5ff25beec7ad7fb229b943ecb86fe55bcad531c4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 31 Aug 2015 14:39:23 -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. --- nametoaddr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nametoaddr.c') diff --git a/nametoaddr.c b/nametoaddr.c index e6483a35..eb123615 100644 --- a/nametoaddr.c +++ b/nametoaddr.c @@ -31,10 +31,10 @@ #include #endif -#ifdef WIN32 +#ifdef _WIN32 #include -#else /* WIN32 */ +#else /* _WIN32 */ #include #include /* concession to AIX */ @@ -42,9 +42,9 @@ #include #include -#endif /* WIN32 */ +#endif /* _WIN32 */ -#ifndef WIN32 +#ifndef _WIN32 #ifdef HAVE_ETHER_HOSTTON /* * XXX - do we need any of this if doesn't declare @@ -62,7 +62,7 @@ struct rtentry; /* declarations in */ #endif /* HAVE_ETHER_HOSTTON */ #include #include -#endif /* WIN32 */ +#endif /* _WIN32 */ #include #include @@ -140,7 +140,7 @@ pcap_nametoaddrinfo(const char *name) bpf_u_int32 pcap_nametonetaddr(const char *name) { -#ifndef WIN32 +#ifndef _WIN32 struct netent *np; if ((np = getnetbyname(name)) != NULL) -- cgit v1.2.3