[cfe-dev] [PATCH] Libc++ Windows fixes (Attention all libc++ ports!!!)
Howard Hinnant
hhinnant at apple.com
Sun Sep 25 14:53:42 PDT 2011
On Sep 25, 2011, at 5:45 PM, David Chisnall wrote:
>>
>> Suggestion:
>>
>> #ifdef __APPLE__
>> # define _LIBCPP_GET_C_LOCALE 0
>> #else
>> # define _LIBCPP_GET_C_LOCALE __cloc()
>> #endif
>
> I'm not sure what this is for. 0 is not the C locale on Apple, it is the current thread's locale. From the xlocale(3) man page on Darwin:
>
>> For each of these rou-
>> tines, if a NULL locale_t is given, the current locale is used.
>
>
> If we should be using the C locale, then we should not be using 0 on OS X. If we should be using the current locale, we should not be using __cloc() anywhere else...
On the same man page:
CONVENIENCE FUNCTIONS
... If a NULL locale_t is passed, the C locale will be used.
Howard
More information about the cfe-dev
mailing list