Skip to content

Commit a4a6ee4

Browse files
committed
Check for "msys" so it doesn't use 'con' by checking for an evironment
variable.
1 parent 5fde861 commit a4a6ee4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/include/port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.88 2006/03/04 04:30:40 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.89 2006/03/05 05:33:12 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -84,7 +84,7 @@ extern int find_other_exec(const char *argv0, const char *target,
8484

8585
#if defined(WIN32) && !defined(__CYGWIN__)
8686
#define DEVNULL "nul"
87-
/* "con" does not work from the MinGW 1.0.10 console. */
87+
/* "con" does not work from the Msys 1.0.10 console (part of MinGW). */
8888
#define DEVTTY "con"
8989
#else
9090
#define DEVNULL "/dev/null"

src/port/sprompt.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/sprompt.c,v 1.14 2006/03/04 04:30:41 momjian Exp $
11+
* $PostgreSQL: pgsql/src/port/sprompt.c,v 1.15 2006/03/05 05:33:12 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -65,7 +65,12 @@ simple_prompt(const char *prompt, int maxlen, bool echo)
6565
*/
6666
termin = fopen(DEVTTY, "r");
6767
termout = fopen(DEVTTY, "w");
68-
if (!termin || !termout)
68+
if (!termin || !termout
69+
#ifdef WIN32
70+
/* See DEVTTY comment for msys */
71+
|| (getenv("OSTYPE") && strcmp(getenv("OSTYPE"), "msys") == 0)
72+
#endif
73+
)
6974
{
7075
if (termin)
7176
fclose(termin);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy