Am 17.12.2010 14:44, schrieb Paolo Bonzini:
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.".
I had the \r problem when using msys. There seem to be several
factors:
* git configuration (add CR / don't add CR)
* msys mount options (binmode / textmode)
* (g)awk (read binary)
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
I currently have no possibility to run tests with other awk
implementations,
so I cannot tell whether \012 is needed at all (\r is not a new
invention).
Do all awk versions support regular expressions with characters in
octal encoding?.
Perhaps we can wait several days for feedback from users with an
old
awk
and apply the patch if there is none.