Compare commits

..
Author SHA1 Message Date
Derek Bailey 6b6f3ee363 Enable locale-independent strtod_l/strtof_l on Linux glibc
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
2026-10-21 20:12:44 +00:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -404,7 +404,7 @@ class CppGenerator : public BaseGenerator {
code_ += "struct {{STRUCT_NAME}}BinarySchema {";
code_ += " static const uint8_t *data() {";
code_ += " // Buffer containing the binary schema.";
code_ += " alignas(uint64_t) static const uint8_t bfbsData[" +
code_ += " static const uint8_t bfbsData[" +
NumToString(parser_.builder_.GetSize()) + "] = {";
code_ += binary_schema_hex_text;
code_ += " };";
+1 -1
View File
@@ -12,7 +12,7 @@ namespace Example {
struct MonsterBinarySchema {
static const uint8_t *data() {
// Buffer containing the binary schema.
alignas(uint64_t) static const uint8_t bfbsData[14520] = {
static const uint8_t bfbsData[14520] = {
0x20,0x00,0x00,0x00,0x42,0x46,0x42,0x53,0x00,0x00,0x00,0x00,0x14,0x00,0x20,0x00,0x04,0x00,0x08,0x00,
0x0C,0x00,0x10,0x00,0x14,0x00,0x18,0x00,0x00,0x00,0x1C,0x00,0x14,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x34,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x70,0x0D,0x00,0x00,0x08,0x00,0x00,0x00,