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: perror() changes the orientation of stderr to byte-oriented mode if stderr is not oriented yet.


Hi Corinna,

On Wed, 27 Jun 2018 14:55:03 +0200
Corinna Vinschen wrote:
> again, please send patches related to newlib to the newlib mailing list.
> Newlib patches affect more targets than just Cygwin.  I redirected this
> mail to the newlib list and attached your original attachments.  Thank
> you.

Next time I will. Sorry for my inadequate understanding about newlib.

> I'm not sure exactly.  It may be nice to keep the writes buffered
> if the original stderr stream is buffered as well.
> 
> What about duplicating the non-_FVWRITE_IN_STREAMIO part of _fputs_r,
> just without calling ORIENT?

Thank you for your suggestion.

I tried this but it failed because __sputc_r() called from _fputs_r also
sets orientation. So I have borrowed the codes from __swbuf_r() in wbuf.c
so that the strings are pushed directly into the buffer.

Could you please have a look?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

Attachment: 0001-Fix-a-bug-of-perror-which-changes-the-orientation-of.patch
Description: Binary data


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