aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-05-30 15:50:05 -0400
committerArnold D. Robbins <arnold@skeeve.com>2016-05-30 15:50:05 -0400
commitd69572fbae2d25a2c51d846733a49d45e5b04269 (patch)
tree03be0bb6e1e423fe2f82177fc20e4b3bb1b73ba2
parent0b2f0d477ce612eecc2a6654bff62ccbb1887f06 (diff)
downloadegawk-d69572fbae2d25a2c51d846733a49d45e5b04269.tar.gz
egawk-d69572fbae2d25a2c51d846733a49d45e5b04269.tar.bz2
egawk-d69572fbae2d25a2c51d846733a49d45e5b04269.zip
Always force number on -v arguments, even if LC_NUMERIC not defined.
-rw-r--r--ChangeLog12
-rw-r--r--main.c4
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 59b96fac..1476f3c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
+2016-05-30 Arnold D. Robbins <arnold@skeeve.com>
+
+ * main.c (arg_assign): Fully bracket ifdefs around call
+ to force_number. Thanks to Andrew Schorr for pointing out
+ that force_number was called only if LC_NUMERIC was defined.
+
2016-05-26 Andrew J. Schorr <aschorr@telemetry-investments.com>
-
+
* awk.h (get_actual_argument): Remove unused "optional" argument.
(get_scalar_argument, get_array_argument): Change macro definition to
remove 3rd "optional" argument.
@@ -242,7 +248,7 @@
Regex: treat [x] as x if x is a unibyte encoding error.
This change removes an ifdef GAWK.
- * lib/regcomp.c (parse_byte) [ !_LIBC && RE_ENABLE_I18N]: New function.
+ * regcomp.c (parse_byte) [ !_LIBC && RE_ENABLE_I18N]: New function.
(build_range_exp) [ !_LIBC && RE_ENABLE_I18N]: Use it.
From Paul Eggert <eggert@cs.ucla.edu>.
@@ -377,7 +383,7 @@
2015-09-11 Daniel Richard G. <skunk@iSKUNK.ORG>
- * regcomp.h: Include strings.h, wrapped in ifdef. Revise
+ * regcomp.c: Include strings.h, wrapped in ifdef. Revise
defines for BTOWC.
* regex_internal.h: Remove ZOS_USS bracketing ifdefs.
diff --git a/main.c b/main.c
index fa4bceed..cb434f90 100644
--- a/main.c
+++ b/main.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2015 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2016 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -1134,7 +1134,9 @@ arg_assign(char *arg, bool initing)
*/
if (do_posix)
setlocale(LC_NUMERIC, "C");
+#endif /* LC_NUMERIC */
(void) force_number(it);
+#ifdef LC_NUMERIC
if (do_posix)
setlocale(LC_NUMERIC, locale);
#endif /* LC_NUMERIC */