mirror of
https://github.com/google/flatbuffers.git
synced 2026-11-07 20:59:10 +00:00
Enable locale-independent strtod_l/strtof_l on Linux glibc (#9424)
Restrict the `__linux__` check for `FLATBUFFERS_LOCALE_INDEPENDENT` in `include/flatbuffers/base.h` to `(!defined(__linux__) || defined(__GLIBC__))` so Linux with glibc enables `strtod_l`/`strtof_l`. PiperOrigin-RevId: 1002266254
This commit is contained in:
@@ -271,7 +271,7 @@ namespace flatbuffers {
|
||||
#if (defined(_MSC_VER) && _MSC_VER >= 1800) || \
|
||||
(defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__>= 26) || \
|
||||
(defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 700)) && \
|
||||
!defined(__Fuchsia__)
|
||||
!defined(__Fuchsia__) && (!defined(__linux__) || defined(__GLIBC__))
|
||||
#define FLATBUFFERS_LOCALE_INDEPENDENT 1
|
||||
#else
|
||||
#define FLATBUFFERS_LOCALE_INDEPENDENT 0
|
||||
|
||||
Reference in New Issue
Block a user