bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed for non-DOS files


From: Hans-Bernhard Broeker
Subject: Re: sed for non-DOS files
Date: 6 Feb 2002 14:37:05 GMT

Paul Eggert <address@hidden> wrote:
>> From: Hans-Bernhard Broeker <address@hidden>
>> Date: 5 Feb 2002 14:15:24 GMT
>> 
>> In that case, the bug is clearly in GCC.  C sources are text files,
>> and thus GCC should read them in a way that makes sure
>> platform-defined line endings are treated correctly.

> The problem doesn't occur on DOS.  It occurs on Unix, when you use DOS
> files without converting them to Unix format.  

Exactly.  It also occurs on Windows using Cygwin, which tries to be so
exactly equivalent to Unix that it falls into exactly the same trap.

It's actually worse, since there is no transfer of files involved in
the problem, there.  As soon as a traditional DOS/Windows tool creates
or modifies a text file, chances are that'll break the file for use by
Cygwin-compiled Unix programs if you used binary mounts.

Ie you can have this situation, all commands being done from a single
command prompt, without any other OS involved:

        gcc sourcefile.c      # works nicely
        edit sourcefile.c     # not touching line xxx at all
        gcc sourcefile.c      # now you get a parse error at line xxx




-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]