]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
detection of snprintf for Visual <= 2012
authorinikep <inikep@gmail.com>
Mon, 9 May 2016 12:37:41 +0000 (14:37 +0200)
committerinikep <inikep@gmail.com>
Mon, 9 May 2016 12:37:41 +0000 (14:37 +0200)
appveyor.yml
lib/common/util.h

index 04fea761e09a8d9a8747fffeec508560cbcc10e4..303c6317214bea3d3aea7f2b487ebbee14790a71 100644 (file)
@@ -7,7 +7,9 @@ platform:
 - x64
 environment:
   matrix:
+  - PlatformToolset: v100
   - PlatformToolset: v110
+  - PlatformToolset: v120
   - PlatformToolset: v140
 build_script:
 - cmd: >-
@@ -16,7 +18,7 @@ build_script:
     msbuild "visual\2013\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=%PlatformToolset% /t:Clean,Build /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
 test_script:
 - cmd: >-
-    ECHO %APPVEYOR_BUILD_FOLDER%\bin\%PLATFORM%\%CONFIGURATION%\fuzzer.exe %FUZZERTEST%
+    ECHO %APPVEYOR_BUILD_FOLDER%\visual\2013\bin\%PLATFORM%\%CONFIGURATION%\fuzzer.exe %FUZZERTEST%
 
     SET FUZZERTEST=-T5mn
 
index 61b542957fe6a878753cfa562b3fc1a3e9ff5297..a548b4aec80b33a38ef0ade68a142715ec736252 100644 (file)
@@ -46,9 +46,12 @@ extern "C" {
 #  define _CRT_SECURE_NO_WARNINGS    /* Disable some Visual warning messages for fopen, strncpy */
 #  define _CRT_SECURE_NO_DEPRECATE   /* VS2005 */
 #  pragma warning(disable : 4127)    /* disable: C4127: conditional expression is constant */
-#  define snprintf sprintf_s         /* snprintf unsupported by Visual <= 2012 */
-//#  define snprintf _snprintf    
+#if _MSC_VER <= 1700                 /* (1700 = Visual Studio 2012) */
+    #define snprintf sprintf_s       /* snprintf unsupported by Visual <= 2012 */
+  //#define snprintf _snprintf
 #endif
+#endif
+
 
 /* Unix Large Files support (>4GB) */
 #if !defined(__LP64__)              /* No point defining Large file for 64 bit */