-
-
Notifications
You must be signed in to change notification settings - Fork 497
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
supertux/main: add try-catch for locale initialization. #1601
Conversation
Sorry, @ericonr can you please rebase this? |
When rebasing, make sure to change |
I'm not sure |
Rebasing will tell you what's the exact line to use, normally it should show the correct line alongside your changes. |
@Semphriss the line for @tobbi it's been rebased, but I had to add an additional change, since using In order to get it to build here, I also had to fix |
It seems the c++17 transition was reverted... What do I do with my PR now? What are the future plans? (for what it's worth, I didn't have any issue linking this version) |
I'm sorry about the lack of discussion / coordination here. Please rebase so that it merges cleanly with the current master and then we can merge. Should there be a C++17 support in the future, we'll touch your code again. But currently, the C++17 code fails to build for a lot of the people on the team, thus it getting reverted. |
Unfortunately, libstdc++'s locale implementation is platform specific (unlike libcxx, which has a single universal implementation), and its "generic" implementation, from 2003, claims to support only the "C" locale, and raises an exception if one tries to use a locale other than "C". We catch that exception and allow the application to proceed on such systems, even though it is very much not ideal. Also leave note for future code changes. Fixes #1564.
__GLIBCXX__ indicates that one is using libstdc++, not glibc. The correct macro for this is __GLIBC__. Also expand the comment about execinfo inclusion.
Ok, it's been rebased. I also left a warning about the mistake I had corrected in the previous version. |
Thanks 👍 |
Fixes #1564.