diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-08-29 22:41:42 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-08-29 22:41:42 +0000 |
commit | 076bfcf612a1f774b214e335184d010b60bfad40 (patch) | |
tree | 1b165613e8f1bae3cc7ccd96407a88378283fbec /libio/iogetwline.c | |
parent | c7c3b0e907efac218b329ebbe3fc7432ec4415c5 (diff) | |
download | glibc-076bfcf612a1f774b214e335184d010b60bfad40.tar.gz |
Update.
2000-08-29 Ulrich Drepper <drepper@redhat.com>
* libio/iogetline.c: Set mode before the loop in case n==0.
* libio/iogetwline.c: Likewise.
2000-08-29 H.J. Lu <hjl@gnu.org>
* libio/fileops.c (new_do_write): Check fp->_mode <= 0 instead
of fp->_mode < 0.
(_IO_new_file_overflow): Likewise.
* libio/genops.c (_IO_flush_all): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
Diffstat (limited to 'libio/iogetwline.c')
-rw-r--r-- | libio/iogetwline.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/iogetwline.c b/libio/iogetwline.c index 2d9eca0edc..2559cd8eb6 100644 --- a/libio/iogetwline.c +++ b/libio/iogetwline.c @@ -64,6 +64,8 @@ _IO_getwline_info (fp, buf, n, delim, extract_delim, eof) wchar_t *ptr = buf; if (eof != NULL) *eof = 0; + if (__builtin_expect (fp->_mode, 1) == 0) + _IO_fwide (fp, 1); while (n != 0) { _IO_ssize_t len = (fp->_wide_data->_IO_read_end |