mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-27 01:49:56 +08:00
bfd3894367
On systems that normally use Unix line endings, if config.h.in has somehow been generated with DOS line endings, then awk will treat each CR character as part of the line. This breaks the regular expressions used to edit config.h.in into config.h To fix, manually strip trailing CRs from each “input record” before any other processing. For consistency I also made this change to the code dealing with AC_CONFIG_FILES substitutions. On systems that use DOS line endings, both changes should be no-ops. Reported by David Allsopp in <https://savannah.gnu.org/support/?110554>. He offered a different patch, which also worked on my machine, but it used a regular expression as the third argument to ‘split’, which might not be portable across awk implementations (the gawk manual is unclear). Also, it could produce a config.h with _inconsistent_ line endings. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): In the awk script, strip a trailing CR from each record as the first action. (_AC_OUTPUT_FILES_PREPARE): Likewise. * tests/torture.at (CRLF line endings in .in files): New test. Co-authored-by: David Allsopp <david@davidallsopp.com> |
||
---|---|---|
.. | ||
autoconf | ||
Autom4te | ||
autoscan | ||
autotest | ||
emacs | ||
m4sugar | ||
autom4te.in | ||
freeze.mk | ||
local.mk | ||
version.in |