1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +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

@@ -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