-
Notifications
You must be signed in to change notification settings - Fork 104
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
djvulibre: don't mangle locales #1565
Conversation
It's generally a bad idea, because this rusn in our main thread, and locales in POSIX are a mess. May help w/ koreader/koreader#9918
Picked a few upstream fixes while I was in there ;o). |
# define DJVU_LOCALE do { \ | ||
- setlocale(LC_ALL,""); \ | ||
- setlocale(LC_NUMERIC,"C"); \ | ||
djvu_programname(argv[0]); } while (0) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one does seem a bit curious and in need of patching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should only affect tools, though, which we probably don't use ;o).
The culprit is likely the context creation one, I would imagine.
(Again, I did a very wide sweep just to be safe).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at the context in detail, common.h does sound quite, ahem, common though xp
-#ifndef DO_CHANGELOCALE | ||
-# define DO_CHANGELOCALE 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to just -DDO_CHANGELOCALE=0
or whatever instead of doing a patch that needs to be maintained? (Although this particular dependency is fairly static.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I went with the nuclear option just to be safe (and because I already had a patch to generate anyway).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but I think the patch to libdjvu/GString.cpp may not be necessary as stated in the comment
It's generally a bad idea, because this runs in our main thread, and locales in POSIX are a mess.
May help w/ koreader/koreader#9918
This change is