Re: [PATCH] On non-Cygwin, use O_TEXT when O_BINARY is not set.
Michael Haubenwallner <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On 2/21/19 10:56 AM, Corinna Vinschen wrote: > 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? Actually I've no idea whereever newlib can go beyond Cygwin and Linux. To me, this line is a typo, and I won't care if these lines are dropped. Thanks! /haubi/
signature.asc
(application/pgp-signature, 981 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAEBCgB9FiEEY4PJ0Y//u+XgtVrKscWEirl385IFAlxulb9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYz ODNDOUQxOEZGRkJCRTVFMEI1NUFDQUIxQzU4NDhBQjk3N0YzOTIACgkQscWEirl3 85KRgQ//b9NMGHrArYdH/jQtBThWZTUEs94L/6WsDKvgWGME9gJopaRhxj4Kvson hhs/81KHPWpDsFKQyEkYk9mgKgLvJTh9KIbAlHJi76yW0fZZYU4tjclv7ee36keQ KeoSEq/W0n7yKGs3gDtqJpKOwnVjYTXxggDaC6c+A+UPe7RBHsdPakX4LT3f04EK jTlD8jkp4qlAOa0KTp3YZ9jrqBwn1Y8YRHoPyfa74/cpoSUExoDIoXndKgs5VPJP 9ENFIiCJ8tOd6H+gscRDRa2COt61Wl0HhfRa190Vz6RhbmOXOdHBDR6R+Lv/OoHG 0JqDSyldhUBD6o0qFSa3/8UKJ1rYiSaVCs/PyShot2ubjtTvcVuX9z2kVISyA0gn JQYt5CepK5XhJoPPr7rXmiFyiz0DcHdemhJhNKwKZ4jkh1b03y9f37J0WSAJlNUD zwzm+WZzdGpGQ3+4i+pQOxM9uvlHOgmDtQR/Dr0MJFEeC1E08KGv7nIHWuBIitok dtZKjU4ROFl6pL1Aau+/B3EKgJiwFZ5P5FOtftQpVzxhxxyI5zPe3v8r5NJef9ij EBCF3JXoibWnfX5ZdYdGVnF3loHx/dTyMYQhmQjRRS1QjBxqVgCxlZAAZcdv2qp7 iQpMpoLhBK/ZD2Qx+YmcQh90RV0Lf/gWdNUHc+bKqUKjysI2EKY= =DI3S -----END PGP SIGNATURE-----