OSDN Git Service

glsl2: Include imports.h to get snprintf wrapper for MSVC
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 13 Aug 2010 00:57:07 +0000 (17:57 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 23 Aug 2010 19:55:50 +0000 (20:55 +0100)
Signed-off-by: José Fonseca <jfonseca@vmware.com>
src/glsl/glsl_types.cpp
src/glsl/ir_explog_to_explog2.cpp
src/mesa/main/imports.h

index 8e80cf9..518abc9 100644 (file)
@@ -29,6 +29,7 @@
 #include "glsl_types.h"
 #include "builtin_types.h"
 extern "C" {
+#include "main/imports.h"
 #include "program/hash_table.h"
 }
 
index 4fe1daa..9bf8271 100644 (file)
@@ -29,7 +29,7 @@
  * and log2 operations.
  */
 
-#include <math.h>
+#include "main/imports.h"
 #include "ir.h"
 #include "glsl_types.h"
 
index 22ac26e..6c2ef52 100644 (file)
@@ -578,6 +578,12 @@ _mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... );
 extern void
 _mesa_debug( const __GLcontext *ctx, const char *fmtString, ... );
 
+
+#if defined(_MSC_VER) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
+
 #ifdef __cplusplus
 }
 #endif