[cfe-dev] [PATCH] Libc++ Windows fixes (Attention all libc++ ports!!!)
Thomas Gamper
icicle at mail.cg.tuwien.ac.at
Mon Sep 26 10:02:34 PDT 2011
For whatever reason Microsoft is prefixing many standard POSIX
functions with an underscore:
http://msdn.microsoft.com/en-us/library/ybk95axf%28v=vs.80%29.aspx
int _sprintf_l(
char *buffer,
const char *format,
locale_t locale [,
argument] ...
);
I hope this helps,
TOM
Zitat von Howard Hinnant <hhinnant at apple.com>:
> On Sep 26, 2011, at 12:30 PM, Joerg Sonnenberger wrote:
>
>> On Mon, Sep 26, 2011 at 10:02:22AM -0400, Howard Hinnant wrote:
>>> I believe it does the right thing, presuming you have uselocale that
>>> sets the per-thread locale to __l.
>>
>> Does libc++ really depend on the crappy idea of per-thread locale?
>
> libc++ depends on the existence of functions such as:
>
> int
> sprintf_l(char * restrict str, locale_t loc, const char *
> restrict format, ...);
>
> which are always called with the "C" locale passed to "loc". These
> functions exist on OS X, and have recently been implemented on
> FreeBSD. One way of emulating them is using a per-thread locale.
>
> In a nutshell, libc++ needs to be able to get the functionality of
> sprintf, but using the "C" locale instead of the current global or
> per-thread locale. And ditto for several other C I/O functions.
>
> Howard
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
More information about the cfe-dev
mailing list