]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(setmode, fileno): Remove; no longer needed, we think.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Jul 2005 18:30:26 +0000 (18:30 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Jul 2005 18:30:26 +0000 (18:30 +0000)
(SET_MODE, SET_BINARY, SET_BINARY2): Remove.
[defined __DJGPP__]: Don't include <io.h> or <sys/exceptn.h>.

src/system.h

index 5aa7f0ec23e853fc6ca523c5b0347efad117c514..00beeb01d7c5bda4b0fb0314771b3ad3612559a6 100644 (file)
@@ -170,14 +170,6 @@ initialize_exit_failure (int status)
 # define R_OK 4
 #endif
 
-/* For systems that distinguish between text and binary I/O.
-   O_BINARY is usually declared in fcntl.h  */
-#if !defined O_BINARY && defined _O_BINARY
-  /* For MSC-compatible compilers.  */
-# define O_BINARY _O_BINARY
-# define O_TEXT _O_TEXT
-#endif
-
 #if !defined O_DIRECT
 # define O_DIRECT 0
 #endif
@@ -210,37 +202,24 @@ initialize_exit_failure (int status)
 # define O_SYNC 0
 #endif
 
+/* For systems that distinguish between text and binary I/O.
+   O_BINARY is usually declared in fcntl.h  */
+#if !defined O_BINARY && defined _O_BINARY
+  /* For MSC-compatible compilers.  */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+
 #ifdef __BEOS__
   /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
 # undef O_BINARY
 # undef O_TEXT
 #endif
 
-#if O_BINARY
-# ifndef __DJGPP__
-#  define setmode _setmode
-#  define fileno(_fp) _fileno (_fp)
-# endif /* not DJGPP */
-# define SET_MODE(_f, _m) setmode (_f, _m)
-# define SET_BINARY(_f) do {if (!isatty(_f)) setmode (_f, O_BINARY);} while (0)
-# define SET_BINARY2(_f1, _f2)         \
-  do {                                 \
-    if (!isatty (_f1))                 \
-      {                                        \
-        setmode (_f1, O_BINARY);       \
-       if (!isatty (_f2))              \
-         setmode (_f2, O_BINARY);      \
-      }                                        \
-  } while(0)
-#else
-# define SET_MODE(_f, _m) (void)0
-# define SET_BINARY(f) (void)0
-# define SET_BINARY2(f1,f2) (void)0
-# ifndef O_BINARY
-#  define O_BINARY 0
-# endif
+#ifndef O_BINARY
+# define O_BINARY 0
 # define O_TEXT 0
-#endif /* O_BINARY */
+#endif
 
 #if HAVE_DIRENT_H
 # include <dirent.h>
@@ -344,13 +323,6 @@ initialize_exit_failure (int status)
 
 #include "timespec.h"
 
-#ifdef __DJGPP__
-  /* We need the declaration of setmode.  */
-# include <io.h>
-  /* We need the declaration of __djgpp_set_ctrl_c.  */
-# include <sys/exceptn.h>
-#endif
-
 #if HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif