[PATCH] [libcxx] Distinguish between MSVC, MSVCRT, and Windows-specific code
Howard Hinnant
hhinnant at apple.com
Thu Aug 1 11:20:33 PDT 2013
Committed revision 187593.
Thanks. Please patch CREDITS.TXT.
Howard
On Aug 1, 2013, at 8:23 AM, Nico Rieck <nico.rieck at gmail.com> wrote:
> Currently _MSC_VER and _WIN32 are used to guard code which is
> MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
> also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
> these macros should not be used interchangeably.
>
> This patch divides all Windows-related bits into the aforementioned
> categories. Two new macros are introduced:
>
> - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
> _MSC_VER, excluding Clang.
> - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
> when _WIN32 is defined.
>
> This leaves _WIN32 for code using the Windows API.
>
> This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.
>
> http://llvm-reviews.chandlerc.com/D1256
>
> Files:
> include/__config
> include/__locale
> include/algorithm
> include/cctype
> include/cmath
> include/cstdio
> include/cstdlib
> include/cstring
> include/cwchar
> include/limits
> include/locale
> include/string
> include/support/win32/limits_win32.h
> include/support/win32/math_win32.h
> include/support/win32/support.h
> include/type_traits
> include/vector
> src/locale.cpp
> src/string.cpp
> test/support/platform_support.h
> <D1256.1.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list