]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In the command-line shell, work around the fact that popen() and pclose()
authordrh <drh@noemail.net>
Thu, 25 Jul 2013 17:07:03 +0000 (17:07 +0000)
committerdrh <drh@noemail.net>
Thu, 25 Jul 2013 17:07:03 +0000 (17:07 +0000)
are not defined in stdio.h. in C89 and later.

FossilOrigin-Name: 8bcbb33fd0a970e16a920e1d35571836dbb9ba50

manifest
manifest.uuid
src/shell.c

index a70f958547086e07e7585d73d53627749b314f18..0267a8bd424536c7101bb40d714ae91dcc69a68c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\stypo\sin\smain.c:\sSQLITE_DEAULT_AUTOMATIC_INDEX\s->\sSQLITE_DEFAULT_AUTOMATIC_INDEX
-D 2013-07-25T16:41:39.550
+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-25T17:07:03.896
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -217,7 +217,7 @@ F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
 F src/resolve.c 89f9003e8316ee3a172795459efc2a0274e1d5a8
 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
 F src/select.c 91b62654caf8dfe292fb8882715e575d34ad3874
-F src/shell.c 7da98ff9cbb19d7ef213a295178039bcb457804a
+F src/shell.c 52f975eae87c8338c4dfbf4c2842d2a0971f01fd
 F src/sqlite.h.in d6a7523d6795317aac574fccc67d9df25253771c
 F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0
 F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
@@ -1103,7 +1103,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 4698a82ef855a8e56163622283fb25317d7efdc4
-R 6ed52877d6372e3a1e06cdc8791460bf
-U dan
-Z 26271be395085fd778fe9c8e8c0dcba3
+P cc78e21c7794948a187e694773735058fc7460d7
+R 2224b684736c7849886faa41d9e31dd9
+U drh
+Z a0a43d445d787e155974499407392c91
index bde6301cf5db3cbcf69bdc33d33ac9d57bad0531..7a9178900cfb51c2515767656ea7fe4c73ea843c 100644 (file)
@@ -1 +1 @@
-cc78e21c7794948a187e694773735058fc7460d7
\ No newline at end of file
+8bcbb33fd0a970e16a920e1d35571836dbb9ba50
\ No newline at end of file
index d6b3159a499a10fb40cf4261dd20571a3971fab8..7b8a8ad7f305b2bdbbcb921b1938843440b4ba92 100644 (file)
@@ -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
 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