mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-03 06:33:51 +08:00
Update.
* libio/fileops.c (_IO_file_xsgetn): Allocate buffer if none is allocated so far. [PR libc/1261].
This commit is contained in:
parent
e62ee1e44e
commit
310f95183a
@ -1,5 +1,8 @@
|
||||
1999-08-18 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* libio/fileops.c (_IO_file_xsgetn): Allocate buffer if none is
|
||||
allocated so far. [PR libc/1261].
|
||||
|
||||
* math/libm-test.c (j0_test): Adjust deltas for m68k.
|
||||
(jn_test): Likewise.
|
||||
|
||||
|
@ -849,6 +849,17 @@ _IO_file_xsgetn (fp, data, n)
|
||||
|
||||
want = n;
|
||||
|
||||
if (fp->_IO_buf_base == NULL)
|
||||
{
|
||||
/* Maybe we already have a push back pointer. */
|
||||
if (fp->_IO_save_base != NULL)
|
||||
{
|
||||
free (fp->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
}
|
||||
|
||||
while (want > 0)
|
||||
{
|
||||
have = fp->_IO_read_end - fp->_IO_read_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user