diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2001-05-01 18:18:25 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2001-05-01 18:18:25 +0000 |
commit | b09e3cf8fdb7927bc14af200b418841ebbae070d (patch) | |
tree | f168b58a913e7f9c977278c97d583e5e5e213b3a /newlib | |
parent | edcd155ce6612e705858722e7c97a89eb6e76289 (diff) | |
download | newlib-b09e3cf8fdb7927bc14af200b418841ebbae070d.zip newlib-b09e3cf8fdb7927bc14af200b418841ebbae070d.tar.gz newlib-b09e3cf8fdb7927bc14af200b418841ebbae070d.tar.bz2 |
2001-05-01 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have
real file systems, let __smakebuf() determine if line buffering
should be used for stdout.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/libc/stdio/findfp.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 13a5eb0..a58b1ce 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2001-05-01 Jeff Johnston <jjohnstn@redhat.com> + + * libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have + real file systems, let __smakebuf() determine if line buffering + should be used for stdout. + 2001-04-27 Jeff Johnston <jjohnstn@redhat.com> * libc/stdio/vfscanf.c (__svfscanf_r): Initialize new_exp local var. diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index 64abb1c..c6790c4 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -152,7 +152,16 @@ __sinit (s) s->__sdidinit = 1; std (s->__sf + 0, __SRD, 0, s); + + /* on platforms that have true file system I/O, we can verify whether stdout + is an interactive terminal or not. For all other platforms, we will + default to line buffered mode here. */ +#ifdef HAVE_FCNTL + std (s->__sf + 1, __SWR, 1, s); +#else std (s->__sf + 1, __SWR | __SLBF, 1, s); +#endif + std (s->__sf + 2, __SWR | __SNBF, 2, s); s->__sglue._next = NULL; |