Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
authorHoward Hinnant <hhinnant@apple.com>
Thu, 1 Aug 2013 18:17:34 +0000 (18:17 +0000)
committerHoward Hinnant <hhinnant@apple.com>
Thu, 1 Aug 2013 18:17:34 +0000 (18:17 +0000)
commit0be8f64c44d2fe87fdf8feda175dc39d38a83906
treed690e336aa492ca6a7109bb6d4a8a6d26100f7ee
parent695bad54a89ab84591b5bc3211c77af0d5e675a4
Nico Rieck:  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.

Nico, please prepare a patch for CREDITS.TXT, thanks.

llvm-svn: 187593
20 files changed:
libcxx/include/__config
libcxx/include/__locale
libcxx/include/algorithm
libcxx/include/cctype
libcxx/include/cmath
libcxx/include/cstdio
libcxx/include/cstdlib
libcxx/include/cstring
libcxx/include/cwchar
libcxx/include/limits
libcxx/include/locale
libcxx/include/string
libcxx/include/support/win32/limits_win32.h
libcxx/include/support/win32/math_win32.h
libcxx/include/support/win32/support.h
libcxx/include/type_traits
libcxx/include/vector
libcxx/src/locale.cpp
libcxx/src/string.cpp
libcxx/test/support/platform_support.h