diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-08-31 14:39:23 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-08-31 14:39:23 -0700 |
commit | 5ff25beec7ad7fb229b943ecb86fe55bcad531c4 (patch) | |
tree | 0c9dc7ea5723347abf7836b66695804a0f3ac546 /nametoaddr.c | |
parent | 1a44e70c2d2b754b3f92c66a0a590f6fdc347566 (diff) |
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.
Diffstat (limited to 'nametoaddr.c')
-rw-r--r-- | nametoaddr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nametoaddr.c b/nametoaddr.c index e6483a35..eb123615 100644 --- a/nametoaddr.c +++ b/nametoaddr.c @@ -31,10 +31,10 @@ #include <netdnet/dnetdb.h> #endif -#ifdef WIN32 +#ifdef _WIN32 #include <pcap-stdinc.h> -#else /* WIN32 */ +#else /* _WIN32 */ #include <sys/param.h> #include <sys/types.h> /* concession to AIX */ @@ -42,9 +42,9 @@ #include <sys/time.h> #include <netinet/in.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ -#ifndef WIN32 +#ifndef _WIN32 #ifdef HAVE_ETHER_HOSTTON /* * XXX - do we need any of this if <netinet/if_ether.h> doesn't declare @@ -62,7 +62,7 @@ struct rtentry; /* declarations in <net/if.h> */ #endif /* HAVE_ETHER_HOSTTON */ #include <arpa/inet.h> #include <netdb.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ #include <ctype.h> #include <errno.h> @@ -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) |