]> granicus.if.org Git - taglib/commitdiff
Check for vsnprintf first.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Sat, 1 Aug 2015 01:22:39 +0000 (10:22 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Sat, 1 Aug 2015 14:38:50 +0000 (23:38 +0900)
ConfigureChecks.cmake

index a4a571992258d98cf1171342bb8344f7353d3a6e..5f4f6d9d47676e48effeae2eeac0402c0cd4cd81 100644 (file)
@@ -209,22 +209,22 @@ check_cxx_source_compiles("
   int main() {
     char buf[20];
     va_list args;
-    vsprintf_s(buf, \"%d\", args);
+    vsnprintf(buf, 20, \"%d\", args);
     return 0;
   }
-" HAVE_VSPRINTF_S)
+" HAVE_VSNPRINTF)
 
-if(NOT HAVE_VSPRINTF_S)
+if(NOT HAVE_VSNPRINTF)
   check_cxx_source_compiles("
     #include <cstdio>
     #include <cstdarg>
     int main() {
       char buf[20];
       va_list args;
-      vsnprintf(buf, 20, \"%d\", args);
+      vsprintf_s(buf, \"%d\", args);
       return 0;
     }
-  " HAVE_VSNPRINTF)
+  " HAVE_VSPRINTF_S)
 endif()
 
 # Check for libz using the cmake supplied FindZLIB.cmake