Patched to compile on Windows. trunk
authorRyan C. Gordon <icculus@icculus.org>
Fri, 04 Jul 2008 14:56:08 -0400
branchtrunk
changeset 424 f8ab84a91329
parent 423 ee393c1cf3b4
child 425 8117098722f2
Patched to compile on Windows.
mojoshader.c
mojoshader_opengl.c
--- a/mojoshader.c	Thu Jul 03 15:27:05 2008 -0400
+++ b/mojoshader.c	Fri Jul 04 14:56:08 2008 -0400
@@ -54,6 +54,7 @@
 typedef unsigned int uint;  // this is a printf() helper. don't use for code.
 
 #ifdef _MSC_VER
+#include <malloc.h>
 #define snprintf _snprintf
 typedef unsigned __int8 uint8;
 typedef unsigned __int16 uint16;
--- a/mojoshader_opengl.c	Thu Jul 03 15:27:05 2008 -0400
+++ b/mojoshader_opengl.c	Fri Jul 04 14:56:08 2008 -0400
@@ -1040,7 +1040,7 @@
 {
     if (program != NULL)
     {
-        int i;
+        uint32 i;
         const uint32 refcount = program->refcount;
         if (refcount > 1)
             program->refcount--;
@@ -1238,7 +1238,7 @@
 link_program_fail:
     if (retval != NULL)
     {
-        int i;
+        uint32 i;
         for (i = 0; i < retval->uniform_count; i++)
             Free(retval->uniforms[i].uniform_array_buffer);
         Free(retval->samplers);