1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

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
This commit is contained in:
drh
2013-07-25 17:07:03 +00:00
parent 1d1f07df58
commit 53371f90e4
3 changed files with 14 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\stypo\sin\smain.c:\sSQLITE_DEAULT_AUTOMATIC_INDEX\s->\sSQLITE_DEFAULT_AUTOMATIC_INDEX C In\sthe\scommand-line\sshell,\swork\saround\sthe\sfact\sthat\spopen()\sand\spclose()\nare\snot\sdefined\sin\sstdio.h.\sin\sC89\sand\slater.
D 2013-07-25T16:41:39.550 D 2013-07-25T17:07:03.896
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -217,7 +217,7 @@ F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
F src/resolve.c 89f9003e8316ee3a172795459efc2a0274e1d5a8 F src/resolve.c 89f9003e8316ee3a172795459efc2a0274e1d5a8
F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
F src/select.c 91b62654caf8dfe292fb8882715e575d34ad3874 F src/select.c 91b62654caf8dfe292fb8882715e575d34ad3874
F src/shell.c 7da98ff9cbb19d7ef213a295178039bcb457804a F src/shell.c 52f975eae87c8338c4dfbf4c2842d2a0971f01fd
F src/sqlite.h.in d6a7523d6795317aac574fccc67d9df25253771c F src/sqlite.h.in d6a7523d6795317aac574fccc67d9df25253771c
F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0 F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0
F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
@@ -1103,7 +1103,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
P 4698a82ef855a8e56163622283fb25317d7efdc4 P cc78e21c7794948a187e694773735058fc7460d7
R 6ed52877d6372e3a1e06cdc8791460bf R 2224b684736c7849886faa41d9e31dd9
U dan U drh
Z 26271be395085fd778fe9c8e8c0dcba3 Z a0a43d445d787e155974499407392c91

View File

@@ -1 +1 @@
cc78e21c7794948a187e694773735058fc7460d7 8bcbb33fd0a970e16a920e1d35571836dbb9ba50

View File

@@ -65,7 +65,7 @@
#define isatty(h) _isatty(h) #define isatty(h) _isatty(h)
#define access(f,m) _access((f),(m)) #define access(f,m) _access((f),(m))
#undef popen #undef popen
#define popen(a,b) _popen((a),(b)) #define popen _popen
#undef pclose #undef pclose
#define pclose _pclose #define pclose _pclose
#else #else
@@ -74,6 +74,11 @@
extern int isatty(int); extern int isatty(int);
#endif #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) #if defined(_WIN32_WCE)
/* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty() /* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty()
* thus we always assume that we have a console. That can be * thus we always assume that we have a console. That can be