diff options
author | drh <drh@noemail.net> | 2010-11-23 20:55:27 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-11-23 20:55:27 +0000 |
commit | df60971765011031784af76f012a5dfdae7f2605 (patch) | |
tree | 206548b41f051f5283380163f005f2317b52f199 /tool/lemon.c | |
parent | c84e033c926ea6e872754067d81054a9d5e922b3 (diff) | |
download | sqlite-df60971765011031784af76f012a5dfdae7f2605.tar.gz sqlite-df60971765011031784af76f012a5dfdae7f2605.zip |
Cherry-pick the lemon.c updates out of the lemon-update-2010 branch into
the trunk.
FossilOrigin-Name: 1541ae3fbd7b3d471e002c0ad14e7846f7ad9415
Diffstat (limited to 'tool/lemon.c')
-rw-r--r-- | tool/lemon.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tool/lemon.c b/tool/lemon.c index 70d7c1cbf..898022e28 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -20,7 +20,13 @@ #endif #ifdef __WIN32__ -extern int access(); +#ifdef __cplusplus +extern "C" { +#endif +extern int access(const char *path, int mode); +#ifdef __cplusplus +} +#endif #else #include <unistd.h> #endif @@ -3263,7 +3269,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); } |