[cfe-dev] [PATCH] Libc++ Windows fixes (Attention all libc++ ports!!!)
John McCall
rjmccall at apple.com
Tue Sep 27 10:58:21 PDT 2011
On Sep 27, 2011, at 10:35 AM, Matthieu Monrocq wrote:
> 2011/9/26 Thomas Gamper <icicle at mail.cg.tuwien.ac.at>
> 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
>
> Probably because such identifiers (leading underscore) are reserved for the implementation at global scope.
No, identifiers are only reserved if they start with two underscores (__foo) or an underscore and a capital letter (_Foo).
> The POSIX Standard "pollutes" the global namespace with identifiers that fall within userland therefore, while MSVC does not :)
Only in the same sense that the C standard "pollutes" the global namespace with memcpy and malloc.
Anyway, doesn't really matter; it's what they do.
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110927/87cc4a9f/attachment.html>
More information about the cfe-dev
mailing list