This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/15459] RFE: Add |localeconv_l()| to allow porting of FreeBSD/OSX applications...


http://sourceware.org/bugzilla/show_bug.cgi?id=15459

--- Comment #6 from Roland Mainz <roland.mainz at nrubsig dot org> 2013-05-14 21:50:37 UTC ---
Erm... we're talking about a shared library here. Shared libraries are usually
not supposed to change the thread-local or global variables of a caller, even
temporary (unless documented and _needed_), because (for example) a consumer
calls your library, the library switches thread-local locale using
|uselocale()| and then something like a signal handler setup by the caller gets
executed you're ending-up running it with the "wrong" locale...

... and don't get me started with the performance implications of wrapping
_every_ library call with |saved_locale=uselocale(mylocale); ... ;
(void)uselocale(saved_locale);|

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]