This is the mail archive of the mailing list for the binutils 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]

Re: Can't get binutils to build on Cygwin

Andreas Schwab writes:
> Nick Clifton <> 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.



Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]