-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the Parser independent from the global C-locale #5028
Conversation
efddddf
to
c5cbdfe
Compare
3e9765d
to
3fc7cec
Compare
Generally lookls good to me, thanks! Ready to go in? |
I think better replace the hard-coded
to
|
Hmm, if you're sure this getenv works on all platforms, it is worth trying. Remember we support VS2010 (C++0x) and Android with STLPort. Rather than #ifdeffing those out, your current code may be more universal? |
Have done. Additionally:
Question: |
I have no idea why this error occurred. |
Thanks for the other fixes. |
Merging this, util.h refactor can go in other PR. |
* Make the Parser independent from the global C-locale * Set a specific test locale using the environment variable FLATBUFFERS_TEST_LOCALE * Remove redundant static qualifiers
This PR adds detection of locale-independent functions
strdtod_l
,strdtof_l
,strdtoll_l
,strdtoull_l
instead of locale-widestrdtod
,strdtoll
,strdtoull
.After this PR the IDL parser will be fully compatible with the ASCII alphabet of the Flatbuffers grammar.
There are some direct calls of
strdtod
in the Flatbuffers code, these calls are not related to the parser directly (flexbuffer, reflection).The parse has direct calls of local-wide
atoi
function.A locale-safety of these calls requires investigation (however, all tests passed).
Minor changes:
travis-ci
builds using parallel compilationscalar_fuzzer.cc
code