aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-19 04:54:48 +0000
committerMike Frysinger <vapier@gentoo.org>2012-03-19 04:54:48 +0000
commit509deab2dcc19550953aa1c886b0f0cac7f9b8bd (patch)
tree350bb40f29ec39826d546fe44667422a45e88fd1
parent9a5e0c494c2a828dc4d9223e5f4db61cda7df09f (diff)
downloadgdb-509deab2dcc19550953aa1c886b0f0cac7f9b8bd.zip
gdb-509deab2dcc19550953aa1c886b0f0cac7f9b8bd.tar.gz
gdb-509deab2dcc19550953aa1c886b0f0cac7f9b8bd.tar.bz2
sim: use character classes rather than ranges
A-Z ranges don't work in all locales, so use character classes instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--sim/common/ChangeLog7
-rw-r--r--sim/common/Make-common.in2
-rw-r--r--sim/common/acinclude.m42
-rw-r--r--sim/common/gennltvals.sh32
4 files changed, 25 insertions, 18 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 0f52baf..d3dd137 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-19 Mike Frysinger <vapier@gentoo.org>
+
+ * Make-common.in (TAGS): Change a-z to [:lower:].
+ * acinclude.m4 (sim-trace): Likewise.
+ * gennltvals.sh: Change A-Z0-9 to [:upper:][:digit:].
+ Change A-Za-z0-9 to [:alnum:].
+
2012-03-18 Mike Frysinger <vapier@gentoo.org>
* nrun.c (main): Display strsignal of sigrc.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index c11e51e..1a3a6b6 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -518,7 +518,7 @@ tags etags: TAGS
# And the sim-n-foo.h files create functions that can't be found either.
TAGS: force
cd $(srcdir) && \
- etags --regex '/^\([a-z_]+\) (/\1/' --regex '/^\/[*] TAGS: .*/' \
+ etags --regex '/^\([[:lower:]_]+\) (/\1/' --regex '/^\/[*] TAGS: .*/' \
*.[ch] ../common/*.[ch]
clean: $(SIM_EXTRA_CLEAN)
diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index efb1a29..20155ad 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -178,7 +178,7 @@ AC_ARG_ENABLE(sim-trace,
no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
[[-0-9]]*)
sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
- [[a-z]]*)
+ [[[:lower:]]]*)
sim_trace=""
for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
if test x"$sim_trace" = x; then
diff --git a/sim/common/gennltvals.sh b/sim/common/gennltvals.sh
index bbab145..9036cf3 100644
--- a/sim/common/gennltvals.sh
+++ b/sim/common/gennltvals.sh
@@ -14,13 +14,13 @@ echo '/* Newlib/libgloss macro values needed by remote target support. */'
echo '/* This file is machine generated by gennltvals.sh. */'
$shell ${srccom}/gentvals.sh "" errno ${srcroot}/newlib/libc/include \
- "errno.h sys/errno.h" 'E[A-Z0-9]*' "${cpp}"
+ "errno.h sys/errno.h" 'E[[:upper:][:digit:]]*' "${cpp}"
$shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \
- "signal.h sys/signal.h" 'SIG[A-Z0-9]*' "${cpp}"
+ "signal.h sys/signal.h" 'SIG[[:upper:][:digit:]]*' "${cpp}"
$shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \
- "fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[A-Z0-9]*' "${cpp}"
+ "fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[[:upper:][:digit:]]*' "${cpp}"
# Unfortunately, each newlib/libgloss port has seen fit to define their own
# syscall.h file. This means that system call numbers can vary for each port.
@@ -31,52 +31,52 @@ $shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \
dir=libgloss target=bfin
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=newlib/libc/sys/d10v/sys target=d10v
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
# OBSOLETE dir=libgloss target=d30v
# OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
-# OBSOLETE "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+# OBSOLETE "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=cr16
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=fr30
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=frv
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss/i960 target=i960
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=m32r
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=mn10200
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=mn10300
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=sparc
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss/v850/sys target=v850
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
dir=libgloss target=lm32
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
- "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"