* [patch] fix issues in some locales with using a-z
@ 2006-06-22 4:00 Mike Frysinger
2006-07-06 13:32 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2006-06-22 4:00 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1.1: Type: text/plain, Size: 803 bytes --]
a bunch of files in gdb use a-z in sed expressions without forcing the locale
to c ... in some locales, this can cause some pretty "fun" results:
(observer.sh)
In file included from solib.c:47:
observer.h:35: error: stray '@' in program
observer.h:35: error: expected ')' before 'deftypefun'
(Makefile.in:init.c)
libgdb.a(init.o): In function `initialize_all_files':
init.c:(.text+0xa): undefined reference to `_initialize_amd64_lin'
init.c:(.text+0xf): undefined reference to `_initialize_i386_'
i've fixed this issue in the Makefile.in, gdb_indent.sh, gdb_mbuild,sh, and
observer.sh files the same way that gdbarch.sh was fixed oh-so-long ago
rather than the over-the-top way that autoconf does it (see the top of
gdb/configure under "NLS nuisances" to see what i mean)
-mike
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: gdb-locale.patch --]
[-- Type: text/x-diff, Size: 1412 bytes --]
2006-06-21 Mike Frysinger <vapier@gentoo.org>:
* Makefile.in (init.c) [LANG, LC_ALL]: Set to `c'.
* gdb_indent.sh, gdb_mbuild.sh, observer.sh: Likewise
--- gdb/Makefile.in
+++ gdb/Makefile.in
@@ -1154,6 +1154,8 @@ init.c: $(INIT_FILES)
@rm -f init.c-tmp init.l-tmp
@touch init.c-tmp
@echo gdbtypes > init.l-tmp
+ LANG=c ; export LANG ; \
+ LC_ALL=c ; export LC_ALL ; \
@-echo $(INIT_FILES) | \
tr ' ' '\012' | \
sed \
--- gdb/gdb_indent.sh
+++ gdb/gdb_indent.sh
@@ -3,6 +3,11 @@
# Try to find a GNU indent. There could be a BSD indent in front of a
# GNU gindent so when indent is found, keep looking.
+# Make certain that the script is running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
gindent=
indent=
paths=`echo $PATH | sed \
--- gdb/gdb_mbuild.sh
+++ gdb/gdb_mbuild.sh
@@ -22,6 +22,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02111-1301, USA
+# Make certain that the script is running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
usage()
{
cat <<EOF
--- gdb/observer.sh
+++ gdb/observer.sh
@@ -1,5 +1,10 @@
#!/bin/sh -e
+# Make certain that the script is running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
if test $# -ne 3
then
echo "Usage: $0 <h|inc> <observer.texi> <observer.out>" 1>&2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] fix issues in some locales with using a-z
2006-06-22 4:00 [patch] fix issues in some locales with using a-z Mike Frysinger
@ 2006-07-06 13:32 ` Daniel Jacobowitz
2006-07-06 18:12 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-07-06 13:32 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
On Thu, Jun 22, 2006 at 12:05:42AM -0400, Mike Frysinger wrote:
> a bunch of files in gdb use a-z in sed expressions without forcing the locale
> to c ... in some locales, this can cause some pretty "fun" results:
>
> (observer.sh)
> In file included from solib.c:47:
> observer.h:35: error: stray '@' in program
> observer.h:35: error: expected ')' before 'deftypefun'
>
> (Makefile.in:init.c)
> libgdb.a(init.o): In function `initialize_all_files':
> init.c:(.text+0xa): undefined reference to `_initialize_amd64_lin'
> init.c:(.text+0xf): undefined reference to `_initialize_i386_'
>
> i've fixed this issue in the Makefile.in, gdb_indent.sh, gdb_mbuild,sh, and
> observer.sh files the same way that gdbarch.sh was fixed oh-so-long ago
> rather than the over-the-top way that autoconf does it (see the top of
> gdb/configure under "NLS nuisances" to see what i mean)
Tsk tsk. You must not have tested this patch too well; you made the
mistake I always make in multi-line Makefile commands:
> + LANG=c ; export LANG ; \
> + LC_ALL=c ; export LC_ALL ; \
> @-echo $(INIT_FILES) | \
@ and - are special only on the first command, not if you use
backslashes.
> +# Make certain that the script is running in an internationalized
> +# environment.
Don't you really mean "not" here?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] fix issues in some locales with using a-z
2006-07-06 13:32 ` Daniel Jacobowitz
@ 2006-07-06 18:12 ` Mike Frysinger
2006-07-12 18:04 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2006-07-06 18:12 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 512 bytes --]
On Thursday 06 July 2006 09:32, Daniel Jacobowitz wrote:
> Tsk tsk. You must not have tested this patch too well; you made the
>
> mistake I always make in multi-line Makefile commands:
i noted i screwed this up and posted a fixed patch the next day
> > +# Make certain that the script is running in an internationalized
> > +# environment.
>
> Don't you really mean "not" here?
i copied and pasted from other files ... so yes, they should all be fixed, not
just the files i updated :)
-mike
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] fix issues in some locales with using a-z
2006-07-06 18:12 ` Mike Frysinger
@ 2006-07-12 18:04 ` Daniel Jacobowitz
2006-07-13 3:48 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-07-12 18:04 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
On Thu, Jul 06, 2006 at 02:12:17PM -0400, Mike Frysinger wrote:
> i copied and pasted from other files ... so yes, they should all be fixed, not
> just the files i updated :)
From one other file... I'll do it myself :-)
Tested, checked in.
--
Daniel Jacobowitz
CodeSourcery
2006-07-12 Mike Frysinger <vapier@gentoo.org>:
Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (init.c) [LANG, LC_ALL]: Set to `c'.
* gdb_indent.sh, gdb_mbuild.sh, observer.sh: Likewise.
* gdbarch.sh: Correct comment.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.825
diff -u -p -r1.825 Makefile.in
--- Makefile.in 10 Jul 2006 19:40:27 -0000 1.825
+++ Makefile.in 12 Jul 2006 17:55:28 -0000
@@ -1151,7 +1151,9 @@ init.c: $(INIT_FILES)
@rm -f init.c-tmp init.l-tmp
@touch init.c-tmp
@echo gdbtypes > init.l-tmp
- @-echo $(INIT_FILES) | \
+ @-LANG=c ; export LANG ; \
+ LC_ALL=c ; export LC_ALL ; \
+ echo $(INIT_FILES) | \
tr ' ' '\012' | \
sed \
-e '/^gdbtypes.[co]$$/d' \
Index: gdb_indent.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdb_indent.sh,v
retrieving revision 1.9
diff -u -p -r1.9 gdb_indent.sh
--- gdb_indent.sh 27 Sep 2004 13:43:37 -0000 1.9
+++ gdb_indent.sh 12 Jul 2006 17:55:28 -0000
@@ -3,6 +3,11 @@
# Try to find a GNU indent. There could be a BSD indent in front of a
# GNU gindent so when indent is found, keep looking.
+# Make certain that the script is not running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
gindent=
indent=
paths=`echo $PATH | sed \
Index: gdb_mbuild.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdb_mbuild.sh,v
retrieving revision 1.9
diff -u -p -r1.9 gdb_mbuild.sh
--- gdb_mbuild.sh 17 Dec 2005 22:33:59 -0000 1.9
+++ gdb_mbuild.sh 12 Jul 2006 17:55:28 -0000
@@ -22,6 +22,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02111-1301, USA
+# Make certain that the script is not running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
usage()
{
cat <<EOF
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.364
diff -u -p -r1.364 gdbarch.sh
--- gdbarch.sh 18 Apr 2006 19:20:06 -0000 1.364
+++ gdbarch.sh 12 Jul 2006 17:55:28 -0000
@@ -22,7 +22,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-# Make certain that the script is running in an internationalized
+# Make certain that the script is not running in an internationalized
# environment.
LANG=c ; export LANG
LC_ALL=c ; export LC_ALL
Index: observer.sh
===================================================================
RCS file: /cvs/src/src/gdb/observer.sh,v
retrieving revision 1.9
diff -u -p -r1.9 observer.sh
--- observer.sh 17 Dec 2005 22:34:01 -0000 1.9
+++ observer.sh 12 Jul 2006 17:55:28 -0000
@@ -1,5 +1,10 @@
#!/bin/sh -e
+# Make certain that the script is not running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
if test $# -ne 3
then
echo "Usage: $0 <h|inc> <observer.texi> <observer.out>" 1>&2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] fix issues in some locales with using a-z
2006-07-12 18:04 ` Daniel Jacobowitz
@ 2006-07-13 3:48 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2006-07-13 3:48 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
On Wednesday 12 July 2006 14:04, Daniel Jacobowitz wrote:
> On Thu, Jul 06, 2006 at 02:12:17PM -0400, Mike Frysinger wrote:
> > i copied and pasted from other files ... so yes, they should all be
> > fixed, not just the files i updated :)
>
> From one other file... I'll do it myself :-)
>
> Tested, checked in.
thanks, this looks much better :)
--mike
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch] fix issues in some locales with using a-z
@ 2006-06-23 0:06 Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2006-06-23 0:06 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1.1: Type: text/plain, Size: 878 bytes --]
hmm, lets try this again but with a patch that doesnt break Makefile.in
a bunch of files in gdb use a-z in sed expressions without forcing the locale
to c ... in some locales, this can cause some pretty "fun" results:
(observer.sh)
In file included from solib.c:47:
observer.h:35: error: stray '@' in program
observer.h:35: error: expected ')' before 'deftypefun'
(Makefile.in:init.c)
libgdb.a(init.o): In function `initialize_all_files':
init.c:(.text+0xa): undefined reference to `_initialize_amd64_lin'
init.c:(.text+0xf): undefined reference to `_initialize_i386_'
i've fixed this issue in the Makefile.in, gdb_indent.sh, gdb_mbuild,sh, and
observer.sh files the same way that gdbarch.sh was fixed oh-so-long ago
rather than the over-the-top way that autoconf does it (see the top of
gdb/configure under "NLS nuisances" to see what i mean)
-mike
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: gdb-locale.patch --]
[-- Type: text/x-diff, Size: 1439 bytes --]
2006-06-22 Mike Frysinger <vapier@gentoo.org>:
* Makefile.in (init.c) [LANG, LC_ALL]: Set to `c'.
* gdb_indent.sh, gdb_mbuild.sh, observer.sh: Likewise
--- gdb/Makefile.in
+++ gdb/Makefile.in
@@ -1154,6 +1154,8 @@ init.c: $(INIT_FILES)
@rm -f init.c-tmp init.l-tmp
@touch init.c-tmp
@echo gdbtypes > init.l-tmp
+ @-LANG=c ; export LANG ; \
+ LC_ALL=c ; export LC_ALL ; \
- @-echo $(INIT_FILES) | \
+ echo $(INIT_FILES) | \
tr ' ' '\012' | \
sed \
--- gdb/gdb_indent.sh
+++ gdb/gdb_indent.sh
@@ -3,6 +3,11 @@
# Try to find a GNU indent. There could be a BSD indent in front of a
# GNU gindent so when indent is found, keep looking.
+# Make certain that the script is running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
gindent=
indent=
paths=`echo $PATH | sed \
--- gdb/gdb_mbuild.sh
+++ gdb/gdb_mbuild.sh
@@ -22,6 +22,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02111-1301, USA
+# Make certain that the script is running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
usage()
{
cat <<EOF
--- gdb/observer.sh
+++ gdb/observer.sh
@@ -1,5 +1,10 @@
#!/bin/sh -e
+# Make certain that the script is running in an internationalized
+# environment.
+LANG=c ; export LANG
+LC_ALL=c ; export LC_ALL
+
if test $# -ne 3
then
echo "Usage: $0 <h|inc> <observer.texi> <observer.out>" 1>&2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-13 3:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-22 4:00 [patch] fix issues in some locales with using a-z Mike Frysinger
2006-07-06 13:32 ` Daniel Jacobowitz
2006-07-06 18:12 ` Mike Frysinger
2006-07-12 18:04 ` Daniel Jacobowitz
2006-07-13 3:48 ` Mike Frysinger
2006-06-23 0:06 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox