[Mesa-dev] [PATCH 4/5] nir: Use _snprintf on Windows.

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 13 17:19:51 UTC 2016


From: Jose Fonseca <jfonseca at vmware.com>

---
 src/compiler/nir/nir_print.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 01712fa..2d3fa27 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -31,6 +31,10 @@
 #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)
 {
-- 
2.8.0



More information about the mesa-dev mailing list