Update to bash 5.2
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=355
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
---
|
||||
builtins/printf.def | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
builtins/printf.def | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
--- builtins/printf.def
|
||||
+++ builtins/printf.def 2018-11-29 08:11:53.901189708 +0000
|
||||
@@ -54,6 +54,7 @@ error occurs.
|
||||
+++ builtins/printf.def 2022-06-22 06:26:14.069158235 +0000
|
||||
@@ -56,6 +56,7 @@ error occurs.
|
||||
$END
|
||||
|
||||
#include <config.h>
|
||||
@@ -12,25 +12,38 @@
|
||||
|
||||
#include "../bashtypes.h"
|
||||
|
||||
@@ -661,12 +662,20 @@ printf_builtin (list)
|
||||
@@ -702,7 +703,7 @@ 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 (use_Lmod || posixly_correct == 0)
|
||||
{
|
||||
@@ -710,7 +711,12 @@ printf_builtin (list)
|
||||
|
||||
p = getfloatmax ();
|
||||
f = mklong (start, "L", 1);
|
||||
+
|
||||
+ if (lce && lcl)
|
||||
+ setlocale(LC_NUMERIC, lce);
|
||||
+ if (lce && lcl) setlocale(LC_NUMERIC, lce);
|
||||
+
|
||||
PF (f, p);
|
||||
PF (f, p);
|
||||
+
|
||||
+ if (lce && lcl)
|
||||
+ setlocale(LC_NUMERIC, lcl);
|
||||
+ if (lce && lcl) setlocale(LC_NUMERIC, lcl);
|
||||
}
|
||||
else /* posixly_correct */
|
||||
{
|
||||
@@ -718,7 +724,12 @@ printf_builtin (list)
|
||||
|
||||
p = getdouble ();
|
||||
f = mklong (start, "", 0);
|
||||
+
|
||||
+ if (lce && lcl) setlocale(LC_NUMERIC, lce);
|
||||
+
|
||||
PF (f, p);
|
||||
+
|
||||
+ if (lce && lcl) setlocale(LC_NUMERIC, lcl);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user