]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Additional Windows cleanups.
authorGuy Harris <[email protected]>
Sat, 19 Sep 2015 00:24:23 +0000 (17:24 -0700)
committerGuy Harris <[email protected]>
Sat, 19 Sep 2015 00:24:23 +0000 (17:24 -0700)
Don't import stuff from WinPcap that it really shouldn't be exporting.

Define HAVE_U_INT{N}_T,to suppress definition of intN_t in bittypes.h, as
included by <pcap/pcap.h> on Windows.

Define HAVE_OS_IPV6_SUPPORT if AF_INET6 is defined, so that if we're
building with a VC+SDK combination that defines it and struct in6_addr,
we don't define them ourselves.

netdissect-stdinc.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index de27731..e201afa
 #include <stdio.h>
 #include <winsock2.h>
 #include <ws2tcpip.h>
-#include "bittypes.h"   /* in wpcap's Win32/include */
 #include <ctype.h>
 #include <time.h>
 #include <io.h>
 #include <fcntl.h>
 #include <sys/types.h>
-#include <net/netdb.h>  /* in wpcap's Win32/include */
 
 #ifndef uint8_t
 #define uint8_t                unsigned char
 
 #endif /* _MSC_EXTENSIONS */
 
+/*
+ * Suppress definition of intN_t in bittypes.h, as included by <pcap/pcap.h>
+ * on Windows.
+ * (Yes, HAVE_U_INTn_T, as the definition guards are UN*X-oriented, and
+ * we check for u_intN_t in the UN*X configure script.)
+ */
+#define HAVE_U_INT8_T
+#define HAVE_U_INT16_T
+#define HAVE_U_INT32_T
+#define HAVE_U_INT64_T
+
 #ifdef _MSC_VER
 #define stat _stat
 #define open _open
 #define inline __inline
 #endif
 
+#ifdef AF_INET6
+#define HAVE_OS_IPV6_SUPPORT
+#endif
+
 #ifndef INET6_ADDRSTRLEN
 #define INET6_ADDRSTRLEN 46
 #endif