#if defined(WIN32) && !defined(__CYGWIN__)
#define DEVNULL "nul"
-/* "con" does not work from the MinGW 1.0.10 console. */
+/* "con" does not work from the Msys 1.0.10 console (part of MinGW). */
#define DEVTTY "con"
#else
#define DEVNULL "/dev/null"
*/
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);