summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_print.c
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-04-13 18:19:51 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-04-14 16:38:37 +0100
commitfeb6732e8055f17008077c7505f4cd343380116d (patch)
treecea4a07794cd5af7af44eec080843f648ea6f687 /src/compiler/nir/nir_print.c
parentba0c0e3940c904cd88d51a0dafc41cd91723877c (diff)
nir: Use _snprintf on Windows.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/compiler/nir/nir_print.c')
-rw-r--r--src/compiler/nir/nir_print.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 01712fa1e40..2d3fa271954 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)
{