On 12/17/2010 02:34 PM, Andreas Färber wrote:

Fix this by removing any \r at end of line.

Why isn't cygwin (or whatever you're using) removing it?

I believe Cygwin had an option to choose the line ending style once
during setup. By default it uses Unix-style line endings.
If someone edits source files in some Windows editor, the above issue
seems likely.

Hmm, MSYS is more problematic: the manual says "In the MSYS environment under Windows, `gawk' automatically uses binary mode for reading and writing files. Thus there is no need to use the `BINMODE' variable. This can cause problems with other Unix-like components that have been ported to Windows that expect `gawk' to do automatic translationof `"\r\n"', since it won't.".

My awk foo is insufficient to ack the patch but if it doesn't break
Unices it looks reasonable to me.

I'd be worried a bit about Solaris and other proprietary OSes with prehistoric Unix utilities. Perhaps using \012 instead of \r is better.

Paolo

Reply via email to