From: Yang Luo Date: Mon, 27 Jun 2016 06:52:30 +0000 (-0700) Subject: HAVE_SNPRINTF is defined only for versions of MSVC that have provided snprintf(). X-Git-Tag: libpcap-1.8.0-bp~31^2 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/bffd2c241236e6491e3399fe8b28f4053ed950ad HAVE_SNPRINTF is defined only for versions of MSVC that have provided snprintf(). --- diff --git a/Win32/Prj/libpcap.vcxproj b/Win32/Prj/libpcap.vcxproj index 34cfea7b..d899fc4d 100644 --- a/Win32/Prj/libpcap.vcxproj +++ b/Win32/Prj/libpcap.vcxproj @@ -61,7 +61,7 @@ true Level3 ../../;../../lbl/;../../bpf/;../include/;../../../../common;../../../../dag/include;../../../../dag/drv/windows;../../../Win32-Extensions;./;Win32-Extensions;%(AdditionalIncludeDirectories) - NDEBUG;YY_NEVER_INTERACTIVE;yylval=pcap_lval;_USRDLL;BUILDING_PCAP;HAVE_STRERROR;__STDC__;INET6;_WINDOWS;HAVE_ADDRINFO;WIN32;_U_=;HAVE_SNPRINTF;HAVE_VSNPRINTF;%(PreprocessorDefinitions) + NDEBUG;YY_NEVER_INTERACTIVE;yylval=pcap_lval;_USRDLL;BUILDING_PCAP;HAVE_STRERROR;__STDC__;INET6;_WINDOWS;HAVE_ADDRINFO;WIN32;_U_=;%(PreprocessorDefinitions) .\Release\ .\Release\libpcap.pch .\Release\ @@ -94,7 +94,7 @@ true EditAndContinue ../../;../../lbl/;../../bpf/;../include/;../../../../common;../../../../dag/include;../../../../dag/drv/windows;../../../Win32-Extensions;./;Win32-Extensions;%(AdditionalIncludeDirectories) - _DEBUG;YY_NEVER_INTERACTIVE;yylval=pcap_lval;_USRDLL;BUILDING_PCAP;HAVE_STRERROR;__STDC__;INET6;_WINDOWS;HAVE_ADDRINFO;WIN32;_U_=;HAVE_SNPRINTF;HAVE_VSNPRINTF;%(PreprocessorDefinitions) + _DEBUG;YY_NEVER_INTERACTIVE;yylval=pcap_lval;_USRDLL;BUILDING_PCAP;HAVE_STRERROR;__STDC__;INET6;_WINDOWS;HAVE_ADDRINFO;WIN32;_U_=;%(PreprocessorDefinitions) .\Debug\ .\Debug\libpcap.pch .\Debug\ @@ -126,6 +126,7 @@ + diff --git a/Win32/Prj/libpcap.vcxproj.filters b/Win32/Prj/libpcap.vcxproj.filters index a64ad71e..2383d31e 100644 --- a/Win32/Prj/libpcap.vcxproj.filters +++ b/Win32/Prj/libpcap.vcxproj.filters @@ -55,6 +55,7 @@ Source Files + diff --git a/pcap-stdinc.h b/pcap-stdinc.h index b890b647..0896a602 100644 --- a/pcap-stdinc.h +++ b/pcap-stdinc.h @@ -80,6 +80,14 @@ /* * MSVC. */ + +#if _MSC_VER >= 1900 + /* + * VS 2015 or newer; we have snprintf() function. + */ + #define HAVE_SNPRINTF + #endif + #if _MSC_VER >= 1800 /* * VS 2013 or newer; we have .