perror() changes the orientation of stderr to byte-oriented mode if stderr is not oriented yet.

Corinna Vinschen vinschen@redhat.com
Thu Jun 28 18:32:00 GMT 2018


Hi Takashi,

On Jun 28 20:14, Takashi Yano wrote:
> 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.

No worries.  When coming from the Cygwin side it's not immediately
obvious.

> > 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?

I did.  Thanks for implementing this, but... uhm... I'm not really
thrilled.  So much extra code for such a simple thing as perror...?

On second thought I wonder if we shouldn't just go the FreeBSD route.

What's your stance?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180628/ec5cda8d/attachment.sig>


More information about the Newlib mailing list