|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.sh |
Date: | Fri, 17 Dec 2010 14:44:02 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |