X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/11f73ad248fa22461ca040baa8dc94b864509efa..5f7a5aabca2a890e5f6a1ba7941e796ba17eb12b:/netdissect-stdinc.h diff --git a/netdissect-stdinc.h b/netdissect-stdinc.h index 44967852..8282c584 100644 --- a/netdissect-stdinc.h +++ b/netdissect-stdinc.h @@ -51,13 +51,11 @@ #include #include #include -#include "bittypes.h" /* in wpcap's Win32/include */ #include #include #include #include #include -#include /* in wpcap's Win32/include */ #ifndef uint8_t #define uint8_t unsigned char @@ -137,6 +135,17 @@ #endif /* _MSC_EXTENSIONS */ +/* + * Suppress definition of intN_t in bittypes.h, as included by + * 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 @@ -146,8 +155,6 @@ #define O_RDONLY _O_RDONLY #endif /* _MSC_VER */ -extern int inet_aton (const char *cp, struct in_addr *addr); - /* * With MSVC, for C, __inline is used to make a function an inline. */ @@ -155,6 +162,10 @@ extern int inet_aton (const char *cp, struct in_addr *addr); #define inline __inline #endif +#ifdef AF_INET6 +#define HAVE_OS_IPV6_SUPPORT +#endif + #ifndef INET6_ADDRSTRLEN #define INET6_ADDRSTRLEN 46 #endif @@ -308,6 +319,7 @@ typedef char* caddr_t; * define struct in6_addr so that we can use it for IPv6 addresses. */ #ifndef HAVE_OS_IPV6_SUPPORT +#ifndef AF_INET6 #define AF_INET6 24 struct in6_addr { @@ -318,11 +330,12 @@ struct in6_addr { } __u6_addr; /* 128-bit IP6 address */ }; #endif +#endif #ifndef NI_MAXHOST #define NI_MAXHOST 1025 #endif - + #ifndef INET_ADDRSTRLEN #define INET_ADDRSTRLEN 16 #endif @@ -381,6 +394,11 @@ struct in6_addr { * end of Apple deprecation workaround macros */ +/* + * Function attributes, for various compilers. + */ +#include "funcattrs.h" + #ifndef min #define min(a,b) ((a)>(b)?(b):(a)) #endif