nir: fix (hopefully) windows build
authorRob Clark <robdclark@gmail.com>
Mon, 8 May 2017 17:34:53 +0000 (13:34 -0400)
committerRob Clark <robdclark@gmail.com>
Mon, 8 May 2017 17:41:16 +0000 (13:41 -0400)
Fixes: 53aa109b ("nir: add pass to lower atomic counters to SSBO")
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_print.c

index b6bc3fa7c203eabf918b045196da4453daccadf4..2a9ab542f6e21b9910dac2ccadd8c9b008cf1940 100644 (file)
 
 #include "nir_opcodes.h"
 
+#if defined(_WIN32) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index e6c5c9c830df060a72ef10923b5271664d392551..dfdb5f361919dd43e4b856c1fed51d7a9954cddd 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)
 {