You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
864 B

  1. --- a/src/libinput-util.c
  2. +++ b/src/libinput-util.c
  3. @@ -31,7 +31,6 @@
  4. #include "config.h"
  5. #include <ctype.h>
  6. -#include <locale.h>
  7. #include <stdarg.h>
  8. #include <stdbool.h>
  9. #include <stdio.h>
  10. --- a/src/libinput-util.h
  11. +++ b/src/libinput-util.h
  12. @@ -30,7 +30,6 @@
  13. #include <assert.h>
  14. #include <errno.h>
  15. #include <limits.h>
  16. -#include <locale.h>
  17. #include <math.h>
  18. #include <stdarg.h>
  19. #include <stdbool.h>
  20. @@ -448,16 +447,8 @@ safe_atod(const char *str, double *val)
  21. {
  22. char *endptr;
  23. double v;
  24. - locale_t c_locale;
  25. - /* Create a "C" locale to force strtod to use '.' as separator */
  26. - c_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0);
  27. - if (c_locale == (locale_t)0)
  28. - return false;
  29. -
  30. - errno = 0;
  31. - v = strtod_l(str, &endptr, c_locale);
  32. - freelocale(c_locale);
  33. + v = strtod(str, &endptr);
  34. if (errno > 0)
  35. return false;
  36. if (str == endptr)