qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_conf


From: Stefan Weil
Subject: Re: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.sh
Date: Fri, 17 Dec 2010 20:01:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Iceowl/1.0b1 Icedove/3.0.10

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.

Regards,
Stefan




reply via email to

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