[util] Use O_BINARY instead of _O_BINARY

The latter doesn't seem to be available in Cygwin.  I'm surprised it
compiled before...
pull/199/head
Behdad Esfahbod 9 years ago
parent 100fbeaf19
commit 21e5d7edc4
  1. 4
      util/options.cc

@ -490,7 +490,7 @@ font_options_t::get_font (void) const
GString *gs = g_string_new (NULL); GString *gs = g_string_new (NULL);
char buf[BUFSIZ]; char buf[BUFSIZ];
#if defined(_WIN32) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__CYGWIN__)
setmode (fileno (stdin), _O_BINARY); setmode (fileno (stdin), O_BINARY);
#endif #endif
while (!feof (stdin)) { while (!feof (stdin)) {
size_t ret = fread (buf, 1, sizeof (buf), stdin); size_t ret = fread (buf, 1, sizeof (buf), stdin);
@ -672,7 +672,7 @@ output_options_t::get_file_handle (void)
fp = fopen (output_file, "wb"); fp = fopen (output_file, "wb");
else { else {
#if defined(_WIN32) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__CYGWIN__)
setmode (fileno (stdout), _O_BINARY); setmode (fileno (stdout), O_BINARY);
#endif #endif
fp = stdout; fp = stdout;
} }

Loading…
Cancel
Save