[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110554] AC_CONFIG_HEADERS doesn't work properly for files with Wind
From: |
David Allsopp |
Subject: |
[sr #110554] AC_CONFIG_HEADERS doesn't work properly for files with Windows line-endings |
Date: |
Thu, 21 Oct 2021 12:20:45 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 Edg/94.0.992.47 |
URL:
<https://savannah.gnu.org/support/?110554>
Summary: AC_CONFIG_HEADERS doesn't work properly for files
with Windows line-endings
Project: Autoconf
Submitted by: dra27
Submitted on: Thu 21 Oct 2021 04:20:43 PM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Details:
For headers with standard
#undef MACRO
lines, AC_CONFIG_HEADERS doesn't perform substitutions if the there is no
whitespace following MACRO and the .in file has Windows CRLF line-endings.
This is a mild nuisance, given that the C pre-processor shouldn't mind about
line endings. The work-around is to add space (or space and a comment) after
the macro name, but the fix seems relatively straightforward (assuming the
change is portable).
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index c2721a85..d5c222bb 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -824,9 +824,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
for (key in D) D_is_set[key] = 1
FS = "^G"
}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\r?\$)/ {
line = \$ 0
- split(line, arg, " ")
+ split(line, arg, /[ \r\t]/)
if (arg[1] == "#") {
defundef = arg[2]
mac1 = arg[3]
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110554>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [sr #110554] AC_CONFIG_HEADERS doesn't work properly for files with Windows line-endings,
David Allsopp <=