diff options
Diffstat (limited to 'src/port/sprompt.c')
-rw-r--r-- | src/port/sprompt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/port/sprompt.c b/src/port/sprompt.c index c176360c7ed..812c34d9e5f 100644 --- a/src/port/sprompt.c +++ b/src/port/sprompt.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/sprompt.c,v 1.14 2006/03/04 04:30:41 momjian Exp $ + * $PostgreSQL: pgsql/src/port/sprompt.c,v 1.15 2006/03/05 05:33:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -65,7 +65,12 @@ simple_prompt(const char *prompt, int maxlen, bool echo) */ termin = fopen(DEVTTY, "r"); termout = fopen(DEVTTY, "w"); - if (!termin || !termout) + if (!termin || !termout +#ifdef WIN32 + /* See DEVTTY comment for msys */ + || (getenv("OSTYPE") && strcmp(getenv("OSTYPE"), "msys") == 0) +#endif + ) { if (termin) fclose(termin); |