[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: carriage return line endings vs. literal ^M in status.m4
From: |
Eric Blake |
Subject: |
Re: carriage return line endings vs. literal ^M in status.m4 |
Date: |
Sat, 05 Apr 2008 09:56:21 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 4/5/2008 7:26 AM:
|
| For reference, here is a sequence of two patches, mine, then, on top
| of that, Ralf's:
I merged the two, and and have this queued to be committed (although it
would be nice to hear a success story from Elbert):
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkf3oSQACgkQ84KuGfSFAYBM+gCfbSMW8bXl2aFoJHDlZzCZtl6M
AhsAoMkOIRjLjvEks6DebxzywhIc/jAq
=fASG
-----END PGP SIGNATURE-----
>From 53a593a3ab6c58a284769550f74c1841b7253e8f Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 5 Apr 2008 09:47:42 -0600
Subject: [PATCH] Work around CR EOL markers on OS/2 (www.ecomstation.com Ecs v2
rc4)
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When CR
is the EOL marker, skip a step that would remove and translate
carriage return bytes.
* THANKS: Update.
Reported by Elbert Pol.
---
ChangeLog | 10 ++++++++++
lib/autoconf/status.m4 | 16 +++++++++++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b4ceb28..ffeab3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-04-05 Jim Meyering <address@hidden>
+ and Ralf Wildenhues <address@hidden>
+
+ Work around CR EOL markers on OS/2 (www.ecomstation.com Ecs v2 rc4)
+ * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When CR
+ is the EOL marker, skip a step that would remove and translate
+ carriage return bytes.
+ * THANKS: Update.
+ Reported by Elbert Pol.
+
2008-04-05 Eric Blake <address@hidden>
Avoid some autoreconf -Wall warnings.
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index b4dec08..d7b95a7 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -539,8 +539,22 @@ m4_ifdef([_AC_SUBST_FILES],
[\$ac_cs_awk_pipe_fini])
_ACAWK
_ACEOF
+dnl See if CR is the EOL marker. If not, remove any EOL-related
+dnl ^M bytes and escape any remaining ones. If so, just use mv.
+dnl In case you're wondering how ^M bytes can make it into subs1.awk,
+dnl [from Ralf Wildenhues] one way is if you have e.g.,
+dnl AC_SUBST([variable_that_contains_cr], ["
+dnl "])
+dnl The original aim was that users should be able to substitute any
+dnl characters they like (except for \0). And the above is not so
+dnl unlikely if the configure script itself happens to be converted
+dnl to w32 text mode.
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" < "$tmp/subs1.awk" >
"$tmp/subs.awk" \
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
|| AC_MSG_ERROR([could not setup config files machinery])
_ACEOF
--
1.5.4
- Re: carriage return line endings vs. literal ^M in status.m4, (continued)
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Working os/2 configuratie, Elbert Pol, 2008/04/05
- Re: Working os/2 configuratie, Eric Blake, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4,
Eric Blake <=
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Elbert Pol, 2008/04/06
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Eric Blake, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Eric Blake, 2008/04/05
Re: Re: carriage return line endings vs. literal ^M in status.m4, ziedar, 2008/04/06