Mail Archives: djgpp/1999/12/21/19:51:03
Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote:
> CR-only is a rare thing to come across. It's what you get in Apple
> Macintosh text files. But Mac users usually know they have to transfer
> text files as text, not binary, to other architectures, so this
> happens rather rarely, anyway. The fact that Macs store a 'file type'
> with each file, in their 'resource fork' probably helps to avoid this
> type of bug.
>
> OTOH, you'll most probably see right away that something's wrong with
> such files, in any DOS or Windows editor, as soon as you open it. I
> wouldn't expect any of them to interpret such line endings without
> complaining loudly, so it's hard to believe any user could fail to
> notice this as the source of problems.
It can and does happen. I'm not suggesting that this is a serious
failing of gcc but it is something users need to be aware of.
IMHO a decent editor will leave the line-endings intact and will give
the user the option to convert them. Only lame editors (DOS-Edit ;)
mess with white space without telling the user.
> > Another thing to watch out for is make, the *nix version only accepts
> > NL line ends and will give some cryptic error messages if it
> > encounters a CR.
>
> But that doesn't have any relevance to DJGPP make. It will take either
> Unix or DOS style line endings, without any noticeable difference.
It is something that DJGPP users who want to freely move between DOS
and *nix need to be aware of. The resulting make error does not point
immediately to a transfer problem. I was also wondering if the DJGPP
patch for this could be applied to the main distribution.
- Raw text -