summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-11 18:30:26 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-11 18:30:26 +0000
commit15a1aede787dc2c40246564f125d3707f552e469 (patch)
tree1e41cc5ecc887d9456d45a56d30ec293c21af098 /src
parentbdc138f474c9ba15b948096a5d17918c712237ed (diff)
downloadcoreutils-15a1aede787dc2c40246564f125d3707f552e469.tar.xz
(setmode, fileno): Remove; no longer needed, we think.
(SET_MODE, SET_BINARY, SET_BINARY2): Remove. [defined __DJGPP__]: Don't include <io.h> or <sys/exceptn.h>.
Diffstat (limited to 'src')
-rw-r--r--src/system.h50
1 files changed, 11 insertions, 39 deletions
diff --git a/src/system.h b/src/system.h
index 5aa7f0ec2..00beeb01d 100644
--- a/src/system.h
+++ b/src/system.h
@@ -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