summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS7
-rw-r--r--src/m4.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 577402ad..90d3814b 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,13 @@ GNU M4 NEWS - User visible changes.
`debugmode(t)') could read invalid memory when tracing a series of
pushed macros that are popped during argument collection.
+** Fix regression introduced in 1.4.19 where the `format' builtin
+ inadvertently took on locale-dependent parsing and output of floating
+ point numbers as a side-effect of introducing message translations.
+ While it would be nice for m4 to be fully locale-aware, such a behavior
+ change belongs in a major version release such as 1.6, and not a minor
+ release.
+
* Noteworthy changes in release 1.4.19 (2021-05-28) [stable]
** A number of portability improvements inherited from gnulib, including
diff --git a/src/m4.c b/src/m4.c
index 3c43e407..91750aba 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -419,6 +419,10 @@ main (int argc, char *const *argv)
set_program_name (argv[0]);
retcode = EXIT_SUCCESS;
setlocale (LC_ALL, "");
+ /* m4 1.4.x does not want locale-aware decimal separators in the
+ format builtin; easiest is to override the user's choice of
+ LC_NUMERIC. */
+ setlocale (LC_NUMERIC, "C");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdin);