diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-12 06:44:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-26 21:52:24 -0700 |
commit | 7fcc8648fca0f4d7a8fb03f8844a4b53cd63bc94 (patch) | |
tree | 5f2ef83bfef9f7631f75ce393d9ec8b7bb776991 | |
parent | ee6eae5d2bde5dc57a8534bc4b3a07ed176480ce (diff) | |
download | cygnal-7fcc8648fca0f4d7a8fb03f8844a4b53cd63bc94.tar.gz cygnal-7fcc8648fca0f4d7a8fb03f8844a4b53cd63bc94.tar.bz2 cygnal-7fcc8648fca0f4d7a8fb03f8844a4b53cd63bc94.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; } |