summaryrefslogtreecommitdiffstats
path: root/SOURCES/bash-3.2-printf.patch
diff options
context:
space:
mode:
authorPete Travis <immanetize@fedoraproject.org>2014-10-01 11:54:54 -0600
committerPete Travis <immanetize@fedoraproject.org>2014-10-01 11:54:54 -0600
commitb7fb238e0ec327db793aefa670ffedb8cbd63f0b (patch)
treed795a1fa84fedd491d912cd97c26d80ec523c1fa /SOURCES/bash-3.2-printf.patch
parent08b01b8f3f227bda87ee2591c7e6ccb379fad187 (diff)
downloadrpmbuild-sles11.1-bash.tar.gz
rpmbuild-sles11.1-bash.tar.xz
rpmbuild-sles11.1-bash.zip
starting bash bracnch for sles 11.1sles11.1-bash
Diffstat (limited to 'SOURCES/bash-3.2-printf.patch')
-rw-r--r--SOURCES/bash-3.2-printf.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/SOURCES/bash-3.2-printf.patch b/SOURCES/bash-3.2-printf.patch
new file mode 100644
index 0000000..e250c4f
--- /dev/null
+++ b/SOURCES/bash-3.2-printf.patch
@@ -0,0 +1,32 @@
+--- builtins/printf.def
++++ builtins/printf.def 2006-07-27 17:11:19.000000000 +0200
+@@ -37,6 +37,7 @@ shell variable VAR rather than being sen
+ $END
+
+ #include <config.h>
++#include <locale.h>
+
+ #include "../bashtypes.h"
+
+@@ -501,12 +502,20 @@ printf_builtin (list)
+ case 'A':
+ #endif
+ {
+- char *f;
++ char *f, *lce = getenv("LC_NUMERIC"), *lcl = setlocale(LC_NUMERIC, NULL);
+ floatmax_t p;
+
+ p = getfloatmax ();
+ f = mklong (start, FLOATMAX_CONV, sizeof(FLOATMAX_CONV) - 1);
++
++ if (lce && lcl)
++ setlocale(LC_NUMERIC, lce);
++
+ PF (f, p);
++
++ if (lce && lcl)
++ setlocale(LC_NUMERIC, lcl);
++
+ break;
+ }
+