diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-12-21 11:15:55 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-01-03 13:09:52 +0000 |
commit | e8ae254970cfdeb1b5aba307a95a3189b09c9784 (patch) | |
tree | 43398bdc5c3054040e88a7fafa9c0545408a4e29 /test/serialization/generated_serializer/include | |
parent | 0081e4e6b2941ea47fdf3959696d8edc2629477c (diff) |
libcamera: yaml_parser: Use C locale
When parsing configuration files on systems with differing locales, the
use of strtod can produce different results, or in the worst case - fail
to parse expected values.
Fix this by using strtod_l() instead. To avoid constructing and
destructing a locale_t instance for every use of strtod_l(), create an
RAII class that wraps the locale_t and use it to provide a global "C"
locale.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=174
Bug: https://github.com/raspberrypi/libcamera/issues/29
Reported-by: https://github.com/kralo
Reported-by: Hannes Winkler <hanneswinkler2000@web.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/serialization/generated_serializer/include')
0 files changed, 0 insertions, 0 deletions