This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15459] RFE: Add |localeconv_l()| to allow porting of FreeBSD/OSX applications...
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 12 Jul 2013 03:20:45 +0000
- Subject: [Bug libc/15459] RFE: Add |localeconv_l()| to allow porting of FreeBSD/OSX applications...
- Auto-submitted: auto-generated
- References: <bug-15459-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15459
--- Comment #12 from Rich Felker <bugdal at aerifal dot cx> ---
> The workaround is useless. On OSX uselocale() is expensive (~ 200 times the
> time of a single malloc(100)) and adding manual code to copy the data requires
> a free function which requires a API redesign.
Then this seems like a bug in OSX, not glibc. The whole point of
uselocale is to be able to use it like this. If it's prohibitively
slow, that's a serious QoI issue. If it's also slow on glibc, then the
slowness, not the lack of the *_l function, is the bug that should be
addressed.
> From a point of portability we would have to create different code paths, one
> for OSX/FreeBSD/AIX/Solaris 11.1/Illumos and one for Linux. That expense
> doesn't pay off.
I don't see how this is a problem. If the *_l function exists, use it.
If not, provide your own implementation of the *_l function as a
wrapper around the non-_l version using uselocale.
--
You are receiving this mail because:
You are on the CC list for the bug.