Define snprintf for older versions of MSVC
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Thu, 12 Jul 2018 05:30:58 +0000 (07:30 +0200)
committerGitHub <noreply@github.com>
Thu, 12 Jul 2018 05:30:58 +0000 (07:30 +0200)
for #1677

driver/others/openblas_get_config.c

index 87a2771..ecafa16 100644 (file)
@@ -35,6 +35,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <string.h>
 
+#if defined(_WIN32) && defined(_MSC_VER)
+#if _MSC_VER < 1900
+#define snprintf _snprintf_s
+#endif
+#endif
+
 static char* openblas_config_str=""
 #ifdef USE64BITINT
   "USE64BITINT "