From 5fc59ffb49774ecf1b9da5b749f876b7e04d38c2 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 18 Nov 2010 23:28:09 -0500 Subject: [PATCH] More Visual Studio fixes for Lemon. --- misc/lemon.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/lemon.c b/misc/lemon.c index e4c67b63..f77a9665 100644 --- a/misc/lemon.c +++ b/misc/lemon.c @@ -26,8 +26,13 @@ #endif #ifdef __WIN32__ -//extern int access(); -#include +#ifdef __cplusplus +extern "C" { +#endif +extern int access(const char *path, int mode); +#ifdef __cplusplus +} +#endif #else #include #endif @@ -3302,7 +3307,7 @@ PRIVATE char *append_str(const char *zText, int n, int p1, int p2){ } 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); }