Re: [PATCH] On non-Cygwin, use O_TEXT when O_BINARY is not set.

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Feb 21 09:08, Michael Haubenwallner wrote:
> * libc/stdio/flags.c (__sflags): Fix typo when testing if O_BINARY is
> set, to really set O_TEXT if not O_BINARY, applies to non-Cygwin only.
> ---
>  newlib/libc/stdio/flags.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c
> index 71fc1f60a..cd73385ce 100644
> --- a/newlib/libc/stdio/flags.c
> +++ b/newlib/libc/stdio/flags.c
> @@ -90,7 +90,7 @@ __sflags (struct _reent *ptr,
>  	}
>      }
>  #if defined (O_TEXT) && !defined (__CYGWIN__)
> -  if (!(m | O_BINARY))
> +  if (!(m & O_BINARY))
>      m |= O_TEXT;
>  #endif
>    *optr = m | o;
> -- 
> 2.19.2

Given that O_TEXT is under #if defined (__CYGWIN__) guard, do
we need this code at all?  Does anybody actually *want* O_TEXT
outside of the Windows world?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxudbYACgkQ9TYGna5E
T6DbWg/8CN0rkk8kkdXKMryFhzHvX5siDUQNBQ0+XRCRARW5tFlflMa2IC9+xovY
ZZYfgNAXjyHU8T5ublSTwItbSq37IPuR9RT+JALwGK3YMF82oB5cjo7V7s2pkrI5
Enz5xHZ7J9QDlUlye5gKA70qkV4TEoqYUDjcjq4rI1YYOSEvQ3n1SGOJwzKcu0mn
X+ST/es28GR5dUEyQIBdbG4UoQIfazoaXUtdVRP9aFYq6+ysrM9PNwaIe4+iqDr8
vMzeeVKXm+5VDrvyTVa7LrHRtbawUszSJkOHgpwTSCteQMfoo2a/ZTUGOHuPIKUm
VNIx8t+Piyr+5YTIVpCd3BqlzJX83AV3jQNuNs7vortNT6tn7Qs5ETsw+bXEoDwO
MiDUfo41nvMh/8i/5vxxnZVAlL9kAq0Wub+mzEOicJY21jIbPTMMtNA6eosFVAUH
tyX4bgkHm5lruBOUFtuxlttkiCOKiFlNkr5BLxoB46f1YCPrLC9QzuV7F6shqMTR
ScKGYaAfDklvdHnJPkQXnvZOaI2riNVW3EnLjoPNrMhg8ywqR+3Je/PnBy43EXmk
HG6zamgJeyToM+DuGoal9P6fNjqzv+QrpOWdppZb3lI946CY/b9swYjNUlevIa0p
kTzIrMonro5sZhoJqp9N7zlXdrG5N0Je/XPeWWJ/z2OlZZMG6BY=
=eQze
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.