[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
proposed fix for locale-related problem with LINENO sed script
From: |
Paul Eggert |
Subject: |
proposed fix for locale-related problem with LINENO sed script |
Date: |
Wed, 31 Oct 2001 12:37:19 -0800 (PST) |
By code inspection I found that the LINENO sed script uses character
ranges like 0-9, but this is before the locale is fixed up, so the
resulting behavior is nonportable. Here is a proposed patch.
2001-10-31 Paul Eggert <address@hidden>
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): _AS_CR_PREPARE
needs to be invoked before _AS_LINENO_PREPARE.
(_AS_LINENO_PREPARE): Use as_cr_digits and as_cr_alnum ratherh
than character ranges.
--- m4sh.m4.~1.69.~ Wed Oct 31 11:55:34 2001
+++ m4sh.m4 Wed Oct 31 12:35:56 2001
@@ -155,9 +155,9 @@ fi
as_me=`AS_BASENAME("$[0]")`
-# Rewrite early, but we need PATH_SEPARATOR.
+# Rewrite early, but we need CR and PATH_SEPARATOR.
+_AS_CR_PREPARE
_AS_PATH_SEPARATOR_PREPARE
_AS_LINENO_PREPARE
-_AS_CR_PREPARE
_AS_ECHO_N_PREPARE
_AS_EXPR_PREPARE
@@ -530,8 +530,8 @@ m4_define([_AS_LINENO_PREPARE],
s,$,-,
: loop
- s,^\([[0-9]]*\)\(.*\)[[$]]LINENO\([[^a-zA-Z0-9_]]\),\1\2\1\3,
+
s,^\([['$as_cr_digits']]*\)\(.*\)[[$]]LINENO\([[^'$as_cr_alnum'_]]\),\1\2\1\3,
t loop
s,-$,,
- s,^[[0-9]]*\n,,
+ s,^[['$as_cr_digits']]*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- proposed fix for locale-related problem with LINENO sed script,
Paul Eggert <=