From 0bb5ecc8d799afcbc8dea2a381f0254ec7d7dab5 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 16 Mar 2008 08:34:25 +0000 Subject: [PATCH] * libltdl/config/ltmain.m4sh (NLS nuisances): Fix quoting of localization variables for shell-active characters. * tests/localization.at (localized compiler messages): Extend test. * THANKS: Update. Report by Mike Frysinger. --- ChangeLog | 9 +++++++++ THANKS | 1 + libltdl/config/ltmain.m4sh | 2 +- tests/localization.at | 10 ++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ea3ebcca3..3faaa03d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-03-16 Ralf Wildenhues + + * libltdl/config/ltmain.m4sh (NLS nuisances): Fix quoting of + localization variables for shell-active characters. + * tests/localization.at (localized compiler messages): Extend + test. + * THANKS: Update. + Report by Mike Frysinger. + 2008-03-15 Ralf Wildenhues * tests/defs.m4sh (func_get_config): Build egrep regex to speed diff --git a/THANKS b/THANKS index 6ef4e31bc..9f24876ea 100644 --- a/THANKS +++ b/THANKS @@ -108,6 +108,7 @@ Marc Espie espie@nerim.net Marc J. Fraioli fraioli@dg-rtp.dg.com Mark Kettenis kettenis@phys.uva.nl + Mike Frysinger vapier@gentoo.org Olly Betts olly@muscat.co.uk Patrick Welche prlw1@newn.cam.ac.uk Paul Eggert eggert@twinsun.com diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 9ccb0203b..a9df38d68 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -104,7 +104,7 @@ do save_$lt_var=\$$lt_var $lt_var=C export $lt_var - lt_user_locale=\"$lt_var=\$save_$lt_var; \$lt_user_locale\" + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done diff --git a/tests/localization.at b/tests/localization.at index 195e20c28..311aca743 100644 --- a/tests/localization.at +++ b/tests/localization.at @@ -34,6 +34,9 @@ export LANG LANGUAGE LC_ALL AT_DATA([a.c], [[int x[-1]; ]]) +AT_DATA([b.c], +[[int y; +]]) AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr]) mv -f stdout expected-stdout @@ -44,4 +47,11 @@ AT_CHECK([diff expected-stderr stderr]) LTBASE=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` AT_CHECK([grep -v "^$LTBASE: compile" stdout | diff expected-stdout -]) +# check that we get our quoting right. +LANGUAGE='a; nosuchprogram " '\'' & $x /#+*(){}|,:`\ !%' +export LANGUAGE +AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c], + [0], [stdout], [stderr]) +AT_CHECK([grep nosuchprogram stdout stderr], [1]) + AT_CLEANUP -- 2.47.2