This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getchar issues


Matt Lee wrote:
On Tue, Mar 11, 2008 at 12:13 PM, Jeff Johnston <jjohnstn@redhat.com> wrote:
Matt,

 Thanks for the analysis.  The solution is that __srget must call
CHECK_INIT prior
to calling __srefill_r.  This resolves fake stdin to stdin before
accessing the read buffer.
I have checked in a fix.  Please try it out.

-- Jeff J.


Thanks Jeff. I will use this fix. Is it safe to assume that none of
the other STDIO calls (such as putchar) run into the same issue?
AFAICT by inspection, yes. putchar/putc uses __swbuf_r which already had the CHECK_INIT in it.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]