Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Andreas_Schwab:Factory
bash
bash-3.2-printf.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bash-3.2-printf.patch of Package bash
--- builtins/printf.def | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --- builtins/printf.def +++ builtins/printf.def 2022-06-22 06:26:14.069158235 +0000 @@ -56,6 +56,7 @@ error occurs. $END #include <config.h> +#include <locale.h> #include "../bashtypes.h" @@ -702,7 +703,7 @@ printf_builtin (list) case 'A': #endif { - char *f; + char *f, *lce = getenv("LC_NUMERIC"), *lcl = setlocale(LC_NUMERIC, NULL); if (use_Lmod || posixly_correct == 0) { @@ -710,7 +711,12 @@ printf_builtin (list) p = getfloatmax (); f = mklong (start, FLOATMAX_CONV, USE_LONG_DOUBLE); + + if (lce && lcl) setlocale(LC_NUMERIC, lce); + PF (f, p); + + 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;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor