* libc/stdio/stdio.c (__stextmode): new, see if file is text mode

(__sread): always read in binary mode
(__swrite): always write in binary mode
* libc/include/stdio.h: no getc/putc macros for cygwin; causes
compatibility issues with different dll versions
* libc/stdio/fopen.c: use __stextmode
* libc/stdio/fdopen.c: ditto
* libc/stdio/freopen.c: ditto
* libc/stdio/findfp.c: set up __SCLE for std{in,out,err}
* libc/stdio/local.h: declare __stextmode
This commit is contained in:
DJ Delorie
2000-05-23 23:51:54 +00:00
parent 98c6450eaa
commit c4e1aa0115
8 changed files with 63 additions and 4 deletions

View File

@ -149,7 +149,7 @@ _DEFUN (freopen, (file, mode, fp),
fp->_close = __sclose;
#ifdef __SCLE
if (setmode(fp->_file, O_BINARY) == O_TEXT)
if (__stextmode(fp->_file))
fp->_flags |= __SCLE;
#endif