Use setmode() instead of _setmode() Looks like Cygwin / MSVC declare it that way, and it still works on MinGW32 cross.
diff --git a/util/options.cc b/util/options.cc index 17ad8e6..c9deb0d 100644 --- a/util/options.cc +++ b/util/options.cc
@@ -414,7 +414,7 @@ GString *gs = g_string_new (NULL); char buf[BUFSIZ]; #ifdef HAVE__SETMODE - _setmode (fileno (stdin), _O_BINARY); + setmode (fileno (stdin), _O_BINARY); #endif while (!feof (stdin)) { size_t ret = fread (buf, 1, sizeof (buf), stdin);
diff --git a/util/options.hh b/util/options.hh index ad925b2..298a3f2 100644 --- a/util/options.hh +++ b/util/options.hh
@@ -44,7 +44,7 @@ #include <unistd.h> /* for isatty() */ #endif #ifdef HAVE_IO_H -#include <io.h> /* for _setmode() under Windows */ +#include <io.h> /* for setmode() under Windows */ #endif #include <hb.h>