diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-12 06:44:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-10-11 11:34:01 -0700 |
commit | 58809f0862eb22ad7d71ee62994b7e1127da55d6 (patch) | |
tree | 36e21ef4a43d19495686c0fda68fed15d1915deb | |
parent | 1587e1c6c9a98d006789748f4980a8ce448fda97 (diff) | |
download | cygnal-58809f0862eb22ad7d71ee62994b7e1127da55d6.tar.gz cygnal-58809f0862eb22ad7d71ee62994b7e1127da55d6.tar.bz2 cygnal-58809f0862eb22ad7d71ee62994b7e1127da55d6.zip |
Default stdio streams to text mode.
* newlib/libc/stdio/flags.c (__sflags): If mode is not
O_BINARY, then add O_TEXT.
-rw-r--r-- | newlib/libc/stdio/flags.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c index 7bbd50181..f6331bce4 100644 --- a/newlib/libc/stdio/flags.c +++ b/newlib/libc/stdio/flags.c @@ -89,6 +89,10 @@ __sflags (struct _reent *ptr, break; } } +#if defined (O_TEXT) + if (!(m & O_BINARY)) + m |= O_TEXT; +#endif *optr = m | o; return ret; } |