aboutsummaryrefslogtreecommitdiff
path: root/inet.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-08-31 14:39:23 -0700
committerGuy Harris <guy@alum.mit.edu>2015-08-31 14:39:23 -0700
commit5ff25beec7ad7fb229b943ecb86fe55bcad531c4 (patch)
tree0c9dc7ea5723347abf7836b66695804a0f3ac546 /inet.c
parent1a44e70c2d2b754b3f92c66a0a590f6fdc347566 (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 'inet.c')
-rw-r--r--inet.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/inet.c b/inet.c
index e7d2104e..7cd87ad1 100644
--- a/inet.c
+++ b/inet.c
@@ -36,9 +36,9 @@
#include "config.h"
#endif
-#ifdef WIN32
+#ifdef _WIN32
#include <pcap-stdinc.h>
-#else /* WIN32 */
+#else /* _WIN32 */
#include <sys/param.h>
#ifndef MSDOS
@@ -54,7 +54,7 @@ struct mbuf; /* Squelch compiler warnings on some platforms for */
struct rtentry; /* declarations in <net/if.h> */
#include <net/if.h>
#include <netinet/in.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
#include <ctype.h>
#include <errno.h>
@@ -62,9 +62,9 @@ struct rtentry; /* declarations in <net/if.h> */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if !defined(WIN32) && !defined(__BORLANDC__)
+#if !defined(_WIN32) && !defined(__BORLANDC__)
#include <unistd.h>
-#endif /* !WIN32 && !__BORLANDC__ */
+#endif /* !_WIN32 && !__BORLANDC__ */
#ifdef HAVE_LIMITS_H
#include <limits.h>
#else
@@ -828,7 +828,7 @@ pcap_freealldevs(pcap_if_t *alldevs)
}
}
-#if !defined(WIN32) && !defined(MSDOS)
+#if !defined(_WIN32) && !defined(MSDOS)
/*
* Return the name of a network interface attached to the system, or NULL
@@ -970,7 +970,7 @@ pcap_lookupnet(device, netp, maskp, errbuf)
return (0);
}
-#elif defined(WIN32)
+#elif defined(_WIN32)
/*
* Return the name of a network interface attached to the system, or NULL
@@ -1098,4 +1098,4 @@ pcap_lookupnet(device, netp, maskp, errbuf)
return (0);
}
-#endif /* !WIN32 && !MSDOS */
+#endif /* !_WIN32 && !MSDOS */