This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Can't get binutils to build on Cygwin
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 2 Aug 2006 15:37:58 +0200
- Subject: Re: Can't get binutils to build on Cygwin
- Reply-to: binutils at sources dot redhat dot com
Andreas Schwab writes:
> Nick Clifton <nickc@redhat.com> writes:
>
>> [Note - SED *is* used for editing binary files, hence it is necessary that
>> it does not break binary input].
>
> Trying to use sed on a binary file is a mistake. It is a pure text tool,
> being line oriented.
>
> Andreas.
That might be the case, but it doesn't change the fact that users
out there are using sed to massage binary files. Usually this just
isn't a problem since POSIX systems don't make a difference between
binary and text files. Not so on DOS/Windows systems.
There's also the problem that CR can be the first character of a DOS
lineending, or it can *deliberately* be the last character on an input
text line in a file with Unix LF lineendings. Sed is not capable of
differing these two cases.
I took the opportunity to create a patch to sed, which reverts to
treat CRLF as lineending again, and to add a -b/--binary option so
that the above mentioned cases can be handled at least with an option.
See http://cygwin.com/ml/cygwin-announce/2006-08/msg00001.html
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat