From 15a1aede787dc2c40246564f125d3707f552e469 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Jul 2005 18:30:26 +0000 Subject: (setmode, fileno): Remove; no longer needed, we think. (SET_MODE, SET_BINARY, SET_BINARY2): Remove. [defined __DJGPP__]: Don't include or . --- src/system.h | 50 +++++++++++--------------------------------------- 1 file changed, 11 insertions(+), 39 deletions(-) (limited to 'src') 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 @@ -344,13 +323,6 @@ initialize_exit_failure (int status) #include "timespec.h" -#ifdef __DJGPP__ - /* We need the declaration of setmode. */ -# include - /* We need the declaration of __djgpp_set_ctrl_c. */ -# include -#endif - #if HAVE_INTTYPES_H # include #endif -- cgit v1.2.3-54-g00ecf