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:
Derek Bailey
2026-10-21 13:25:17 -07:00
committed by GitHub
parent b8431fbcd7
commit 9a8a511b52
+1 -1
View File
@@ -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