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: Paul Eggert
Subject: Re: sed for non-DOS files
Date: Tue, 5 Feb 2002 12:07:01 -0800 (PST)

> 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.  In general, if you want
to use a DOS-format text file on Unix, you need to remove trailing CR;
lots of tools break if you don't, and in some cases POSIX requires
them to break.

Recent versions of GCC accept either LF, CR LF, CR, or LF CR as line
ends, so you shouldn't have a problem with them even if you have
messed-up files like that.  (POSIX allows this extension, I think.)
However, you'll still have a problem if you use unconverted text files
from unusual operating systems like S/390, as they use line-end
conventions that are not in GCC's list.



reply via email to

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