More Visual Studio fixes for Lemon.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 18 Nov 2010 23:28:09 -0500
changeset 957 c5992f4bee6d
parent 956 7888858a6777
child 958 02e7826c8c75
More Visual Studio fixes for Lemon.
misc/lemon.c
--- a/misc/lemon.c	Thu Nov 18 22:42:58 2010 -0500
+++ b/misc/lemon.c	Thu Nov 18 23:28:09 2010 -0500
@@ -26,8 +26,13 @@
 #endif
 
 #ifdef __WIN32__
-//extern int access();
-#include <io.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int access(const char *path, int mode);
+#ifdef __cplusplus
+}
+#endif
 #else
 #include <unistd.h>
 #endif
@@ -3302,7 +3307,7 @@
     }
     n = lemonStrlen(zText);
   }
-  if( n+sizeof(zInt)*2+used >= alloced ){
+  if( (int) (n+sizeof(zInt)*2+used) >= alloced ){
     alloced = n + sizeof(zInt)*2 + used + 200;
     z = (char *) realloc(z,  alloced);
   }