This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,AVR]: Use tr instead of set to canonicalize line endings for cmp
- From: Joerg Wunsch <j at uriah dot heep dot sax dot de>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Georg-Johann Lay <avr at gjlay dot de>, gcc-patches at gcc dot gnu dot org, Denis Chertykov <chertykov at gmail dot com>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Wed, 30 May 2012 18:44:16 +0200
- Subject: Re: [Patch,AVR]: Use tr instead of set to canonicalize line endings for cmp
- References: <4FC60FE4.201@gjlay.de> <4FC64AC5.5020404@redhat.com>
- Reply-to: Joerg Wunsch <joerg_wunsch at uriah dot heep dot sax dot de>
As Richard Henderson wrote:
> Instead of writing to stdout, open the file to write, and open
> it in binary mode. Seems much easier than fighting with conversion
> after the fact.
(Disclaimer: I'm not the author.)
There has been an argument that (some) older implementations might not
be able to handle the "b" for binary mode. It's probably questionable
whether such ancient (Unix) implementations bear any relevance anymore
when it comes to the AVR port of GCC though. (IIRC, ISO-C90 did
standardize the "b" mode letter to fopen().)
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)