--- original/src/port/sprompt.c 2012-02-24 02:53:36.000000000 +0400 +++ fix/src/port/sprompt.c 2012-03-17 18:52:15.010559900 +0400 @@ -60,14 +60,13 @@ * Do not try to collapse these into one "w+" mode file. Doesn't work on * some platforms (eg, HPUX 10.20). */ +#ifdef WIN32 + termin = stdin; + termout = stderr; +#else termin = fopen(DEVTTY, "r"); termout = fopen(DEVTTY, "w"); - if (!termin || !termout -#ifdef WIN32 - /* See DEVTTY comment for msys */ - || (getenv("OSTYPE") && strcmp(getenv("OSTYPE"), "msys") == 0) -#endif - ) + if (!termin || !termout) { if (termin) fclose(termin); @@ -76,6 +75,7 @@ termin = stdin; termout = stderr; } +#endif #ifdef HAVE_TERMIOS_H if (!echo)