diff --git a/bash-3.2-setlocale.dif b/bash-3.2-setlocale.dif new file mode 100644 index 0000000..d18c8db --- /dev/null +++ b/bash-3.2-setlocale.dif @@ -0,0 +1,33 @@ +--- locale.c ++++ locale.c 2008-11-25 13:26:15.482501498 +0000 +@@ -42,6 +42,7 @@ extern int dump_translatable_strings, du + + /* The current locale when the program begins */ + static char *default_locale; ++static char fallback[128]; + + /* The current domain for textdomain(3). */ + static char *default_domain; +@@ -294,7 +295,21 @@ get_locale_var (var) + if (locale == 0 || *locale == 0) + locale = lang; + if (locale == 0 || *locale == 0) +- locale = default_locale; /* system-dependent; not really portable. should it be "C"? */ ++ { ++ char *ptr; ++ if (default_locale && *default_locale && (ptr = strstr(default_locale, var)) && (ptr = strchr(ptr, '=')) && ++ptr) ++ { ++ memset (fallback, 0, sizeof(fallback)); ++ strncpy(fallback, ptr, sizeof(fallback)-1); ++ ++ if ((ptr = strchr(fallback, ';'))) ++ *ptr = '\0'; ++ ++ locale = fallback; ++ } ++ else ++ locale = default_locale; /* system-dependent; not really portable. should it be "C"? */ ++ } + + return (locale); + } diff --git a/bash.changes b/bash.changes index e010fea..f10fa64 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 25 14:41:50 CET 2008 - werner@suse.de + +- Parse the return value of setlocale(LC_ALL) (bnc#447846) + ------------------------------------------------------------------- Thu Oct 16 12:07:20 CEST 2008 - werner@suse.de diff --git a/bash.spec b/bash.spec index 685c98d..680c72c 100644 --- a/bash.spec +++ b/bash.spec @@ -28,7 +28,7 @@ Recommends: bash-doc = %bash_vers Suggests: command-not-found AutoReqProv: on Version: 3.2 -Release: 141 +Release: 142 Summary: The GNU Bourne-Again Shell Url: http://www.gnu.org/software/bash/bash.html Source0: bash-%{bash_vers}.tar.bz2 @@ -54,6 +54,7 @@ Patch11: bash-3.1-loadables.dif Patch12: bash-3.2-valgrind.patch Patch14: bash-3.2-sigrestart.patch Patch15: bash-3.2-longjmp.dif +Patch16: bash-3.2-setlocale.dif Patch20: readline-%{rl_vers}.dif Patch21: readline-4.3-input.dif Patch22: readline-5.2-wrap.patch @@ -85,7 +86,7 @@ Group: Documentation/Man Provides: bash:%{_infodir}/bash.info.gz PreReq: %install_info_prereq Version: 3.2 -Release: 100 +Release: 101 AutoReqProv: on %description -n bash-doc @@ -105,7 +106,7 @@ Summary: The Readline Library Group: System/Libraries Provides: bash:/%{_lib}/libreadline.so.5 Version: 5.2 -Release: 100 +Release: 101 Recommends: readline-doc = %{version} Provides: readline = 5.2 Obsoletes: readline <= 5.2 @@ -129,7 +130,7 @@ Summary: Include Files and Libraries mandatory for Development Group: Development/Libraries/C and C++ Provides: bash:%{_libdir}/libreadline.a Version: 5.2 -Release: 141 +Release: 142 Requires: libreadline5 = %{version} Requires: ncurses-devel Recommends: readline-doc = %{version} @@ -153,7 +154,7 @@ Group: System/Libraries Provides: readline:%{_infodir}/readline.info.gz PreReq: %install_info_prereq Version: 5.2 -Release: 100 +Release: 101 AutoReqProv: on %description -n readline-doc @@ -189,6 +190,7 @@ unset p %patch12 -p0 -b .valgrind %patch14 -p0 -b .sigrestart %patch15 -p0 -b .longjmp +%patch16 -p0 -b .setlocale %patch21 -p0 -b .zerotty %patch22 -p0 -b .wrap %patch23 -p0 -b .conf @@ -438,6 +440,8 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true %doc %{_defaultdocdir}/readline/ %changelog +* Tue Nov 25 2008 werner@suse.de +- Parse the return value of setlocale(LC_ALL) (bnc#447846) * Thu Oct 16 2008 werner@suse.de - Let's avoid not needed library dependencies (bnc#439051) * Mon Sep 01 2008 prusnak@suse.cz @@ -493,7 +497,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true - add ncurses-devel requires to readline-devel * Mon Mar 26 2007 rguenther@suse.de - Add bison and ncurses-devel BuildRequires. -* Wed Mar 07 2007 rguenther@suse.de +* Tue Mar 06 2007 rguenther@suse.de - Fix order of changelog entries. Remove duplicate entry. * Wed Feb 28 2007 werner@suse.de - Don't access buffer but resulting pointer for array element names @@ -626,7 +630,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true - Fix prompt problem with invisible characters (bug #36919) * Fri Sep 17 2004 werner@suse.de - Fix line wraping for newlines in prompt (bug #45519) -* Thu Sep 16 2004 schwab@suse.de +* Wed Sep 15 2004 schwab@suse.de - Fix missing return value. * Sat Sep 11 2004 kukuk@suse.de - Disable use of WCONTINUED as long as bash does not check if @@ -745,7 +749,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true - readline-devel should require readline * Mon Jul 29 2002 werner@suse.de - Expansion of `~user/