2008-03-11 Jeff Johnston <jjohnstn@redhat.com>

* libc/stdio/rgetc.c (__srget): Invoke CHECK_INIT to ensure
        stdin gets resolved properly before refilling.
This commit is contained in:
Jeff Johnston 2008-03-11 19:08:39 +00:00
parent 5b7296f637
commit 88348faf5b
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-03-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/rgetc.c (__srget): Invoke CHECK_INIT to ensure
stdin gets resolved properly before refilling.
2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/getopt.h: Hide newlib extensions under

View File

@ -36,6 +36,10 @@ _DEFUN(__srget_r, (ptr, fp),
struct _reent *ptr _AND
register FILE *fp)
{
/* Ensure that any fake std stream is resolved before
we call __srefill_r so we may access the true read buffer. */
CHECK_INIT(fp);
if (__srefill_r (ptr, fp) == 0)
{
fp->_r--;