aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/printf.c1
-rw-r--r--coreutils/sleep.c4
-rw-r--r--coreutils/sort.c1
3 files changed, 2 insertions, 4 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c
index a20fc3301..dd94c8ade 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -122,6 +122,7 @@ static void FAST_FUNC conv_strtod(const char *arg, void *result)
122 char *end; 122 char *end;
123 /* Well, this one allows leading whitespace... so what? */ 123 /* Well, this one allows leading whitespace... so what? */
124 /* What I like much less is that "-" accepted too! :( */ 124 /* What I like much less is that "-" accepted too! :( */
125//TODO: needs setlocale(LC_NUMERIC, "C")?
125 *(double*)result = strtod(arg, &end); 126 *(double*)result = strtod(arg, &end);
126 if (end[0]) { 127 if (end[0]) {
127 errno = ERANGE; 128 errno = ERANGE;
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index 7bfaab920..2658e84df 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -74,10 +74,6 @@ int sleep_main(int argc UNUSED_PARAM, char **argv)
74 sleep(INT_MAX); 74 sleep(INT_MAX);
75 75
76#if ENABLE_FEATURE_FANCY_SLEEP 76#if ENABLE_FEATURE_FANCY_SLEEP
77# if ENABLE_FLOAT_DURATION
78 /* undo busybox.c setlocale */
79 setlocale(LC_NUMERIC, "C");
80# endif
81 duration = 0; 77 duration = 0;
82 do { 78 do {
83 duration += parse_duration_str(*argv); 79 duration += parse_duration_str(*argv);
diff --git a/coreutils/sort.c b/coreutils/sort.c
index b194847d1..6c4e3038c 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -295,6 +295,7 @@ static int compare_keys(const void *xarg, const void *yarg)
295#if ENABLE_FEATURE_SORT_BIG 295#if ENABLE_FEATURE_SORT_BIG
296 case FLAG_g: { 296 case FLAG_g: {
297 char *xx, *yy; 297 char *xx, *yy;
298//TODO: needs setlocale(LC_NUMERIC, "C")?
298 double dx = strtod(x, &xx); 299 double dx = strtod(x, &xx);
299 double dy = strtod(y, &yy); 300 double dy = strtod(y, &yy);
300 /* not numbers < NaN < -infinity < numbers < +infinity) */ 301 /* not numbers < NaN < -infinity < numbers < +infinity) */