nir: Use _snprintf on Windows.
authorJose Fonseca <jfonseca@vmware.com>
Wed, 13 Apr 2016 17:19:51 +0000 (18:19 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 14 Apr 2016 15:38:37 +0000 (16:38 +0100)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/compiler/nir/nir_print.c

index 01712fa1e407ab1a651323604eaefffbcfe202a2..2d3fa2719548e82a1a045b5d8a494c4f8c1ed34c 100644 (file)
 #include <stdlib.h>
 #include <inttypes.h> /* for PRIx64 macro */
 
+#if defined(_WIN32) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
 static void
 print_tabs(unsigned num_tabs, FILE *fp)
 {