diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-12 06:44:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-07-12 06:44:32 -0700 |
commit | d7684c6e8bc6125b14393bcaf461989ff2e81695 (patch) | |
tree | 0ad066599c0b73f1cb0454ad07f0d64352177f11 | |
parent | f77ebbd3c5b1c90dc80d6be033b623b8eb86442f (diff) | |
download | cygnal-d7684c6e8bc6125b14393bcaf461989ff2e81695.tar.gz cygnal-d7684c6e8bc6125b14393bcaf461989ff2e81695.tar.bz2 cygnal-d7684c6e8bc6125b14393bcaf461989ff2e81695.zip |
Default stdio streams to text mode.
* newlib/libc/stdio/flags.c (__sflags): Enable for
Cygwin the piece of code which adds the O_TEXT
mode if O_BINARY is not present. And, also, fix that
piece of code's incorrect use of the | operator to
test a flag instead of &.
-rw-r--r-- | newlib/libc/stdio/flags.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c index 518cc33f1..7d18fd1d1 100644 --- a/newlib/libc/stdio/flags.c +++ b/newlib/libc/stdio/flags.c @@ -90,8 +90,8 @@ _DEFUN(__sflags, (ptr, mode, optr), break; } } -#if defined (O_TEXT) && !defined (__CYGWIN__) - if (!(m | O_BINARY)) +#if defined (O_TEXT) + if (!(m & O_BINARY)) m |= O_TEXT; #endif *optr = m | o; |