Avoid warning on emx+gcc.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Apr 2008 10:50:49 +0000 (12:50 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Apr 2008 10:50:49 +0000 (12:50 +0200)
ChangeLog
lib/binary-io.h

index a851e7c..a3f1159 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-04-12  Bruno Haible  <bruno@clisp.org>
 
+       * lib/binary-io.h [__EMX__]: Include <io.h>.
+
+2008-04-12  Bruno Haible  <bruno@clisp.org>
+
        * lib/fpucw.h: Enable the definitions also for x86_64.
        Needed for NetBSD/x86_64.
        Reported by Thomas Klausner <tk@giga.or.at>.
index 273d35a..9bfddf1 100644 (file)
@@ -1,5 +1,5 @@
 /* Binary mode I/O.
-   Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 # undef O_TEXT
 #endif
 #if O_BINARY
-# if !(defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__)
+# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
+#  include <io.h> /* declares setmode() */
+# else
 #  define setmode _setmode
 #  undef fileno
 #  define fileno _fileno
 # endif
-# if defined __DJGPP__ || defined __CYGWIN__
-#  include <io.h> /* declares setmode() */
-# endif
 # ifdef __DJGPP__
 #  include <unistd.h> /* declares isatty() */
 #  /* Avoid putting stdin/stdout in binary mode if it is connected to the