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] |
On Jun 28 12:28, Craig Howland wrote: > On 06/27/2018 08:55 AM, Corinna Vinschen wrote: > > ... > > > > > > On Jun 27 20:01, Takashi Yano wrote: > > > POSIX states: > > > The perror() function shall not change the orientation of the standard > > > error stream. > > > > > > However, cygwin perror() function changes the orientation of stderr to > > > byte-oriented mode if stderr is not oriented yet. > I suggest that POSIX is in error. The POSIX statement about not changing > the orientation is an extension to the C standard (CX, to be precise). > POSIX is always careful to defer to the C standard, which I think does > indirectly specify that perror() is byte-oriented. The C standard actually > does not directly talk about the orientation of perror(). However, it > directly defines (quoting from the N1570 C11 draft): > [...] > Therefore, the newlib perror() behavior is correct and should not be > changed. It definitely is a mess and there really ought to be a perrorw() > function. Interesting discussion. Under the assumption the standard isn't quite clear on this, we have OpenBSD, FreeBSD and Linux interpreting the standard as "don't change orientiation from perror". NetBSD doesn't care, just like Newlib. As far as I can see, the NetBSD and the Newlib code are older than the interpretation of the other three. Does the new interpretation set a precedent? Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
Attachment:
signature.asc
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |