Message21987
Logged In: YES
user_id=580910
Many thanks to Bob Ippolito for finding what's going on...
It turns out that CoreFoundation.framework calls
__setonlyClocaleconv when it is loaded. As the name suggests this
breaks the locale API's. I don't know what whoever added this
"functionality" was smoking, but at least he had enough sense to make it
possible to restore functionality.
The prototype for __setonlyClocaleconv is: extern int
__setonlyClocaleconv(int val);
Experimentation shows that setting val to a non-zero value breaks
setlocale and setting it to 0 re-enables setlocale. The function returns the
previous setting.
This means it is possible to create a workaround for this issue:
1) Add configure and/or weak-linking magic to detect the function
2) Call oldValue = __setonlyClocaleconv(0) before using a locale API
3) Call __setonlyClocaleconv(oldValue) after doing so.
Would such a patch be accepted? |
|
Date |
User |
Action |
Args |
2007-08-23 14:24:54 | admin | link | issue1005113 messages |
2007-08-23 14:24:54 | admin | create | |
|