diff options
author | drh <drh@noemail.net> | 2013-07-25 17:07:03 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-07-25 17:07:03 +0000 |
commit | 53371f90e4e821fd6595d86c5a32d26fb0ad49dd (patch) | |
tree | 9d644c177748c6bb0e788f1e201b7ffea6c170be /src | |
parent | 1d1f07df583750de55d7e3651b46a297741c9116 (diff) | |
download | sqlite-53371f90e4e821fd6595d86c5a32d26fb0ad49dd.tar.gz sqlite-53371f90e4e821fd6595d86c5a32d26fb0ad49dd.zip |
In the command-line shell, work around the fact that popen() and pclose()
are not defined in stdio.h. in C89 and later.
FossilOrigin-Name: 8bcbb33fd0a970e16a920e1d35571836dbb9ba50
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c index d6b3159a4..7b8a8ad7f 100644 --- a/src/shell.c +++ b/src/shell.c @@ -65,7 +65,7 @@ #define isatty(h) _isatty(h) #define access(f,m) _access((f),(m)) #undef popen -#define popen(a,b) _popen((a),(b)) +#define popen _popen #undef pclose #define pclose _pclose #else @@ -74,6 +74,11 @@ extern int isatty(int); #endif +/* popen and pclose are not C89 functions and so are sometimes omitted from +** the <stdio.h> header */ +FILE *popen(const char*,const char*); +int pclose(FILE*); + #if defined(_WIN32_WCE) /* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty() * thus we always assume that we have a console. That can be |