diff options
Diffstat (limited to 'freebsd/contrib/libpcap/pcap/pcap-inttypes.h')
-rw-r--r-- | freebsd/contrib/libpcap/pcap/pcap-inttypes.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/freebsd/contrib/libpcap/pcap/pcap-inttypes.h b/freebsd/contrib/libpcap/pcap/pcap-inttypes.h index af2c23c8..8b1eb8b9 100644 --- a/freebsd/contrib/libpcap/pcap/pcap-inttypes.h +++ b/freebsd/contrib/libpcap/pcap/pcap-inttypes.h @@ -106,12 +106,23 @@ #define PRIu64 "llu" #endif #endif + + /* + * MSVC's support library doesn't support %zu to print a size_t until + * Visual Studio 2017, but supports %Iu earlier, so use that. + */ + #define PRIsize "Iu" #elif defined(__MINGW32__) || !defined(_WIN32) /* * Compiler is MinGW or target is UN*X or MS-DOS. Just use * <inttypes.h>. */ #include <inttypes.h> + + /* + * Assume the support library supports %zu; it's required by C99. + */ + #define PRIsize "zu" #endif #endif /* pcap/pcap-inttypes.h */ |