From 0be8f64c44d2fe87fdf8feda175dc39d38a83906 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 1 Aug 2013 18:17:34 +0000 Subject: 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 --- libcxx/include/support/win32/math_win32.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libcxx/include/support/win32/math_win32.h') diff --git a/libcxx/include/support/win32/math_win32.h b/libcxx/include/support/win32/math_win32.h index 41c50d62474..22400c0d00f 100644 --- a/libcxx/include/support/win32/math_win32.h +++ b/libcxx/include/support/win32/math_win32.h @@ -11,8 +11,8 @@ #ifndef _LIBCPP_SUPPORT_WIN32_MATH_WIN32_H #define _LIBCPP_SUPPORT_WIN32_MATH_WIN32_H -#if !defined(_MSC_VER) -#error "This header is MSVC specific, Clang and GCC should not include it" +#if !defined(_LIBCPP_MSVCRT) +#error "This header complements Microsoft's C Runtime library, and should not be included otherwise." #else #include @@ -108,6 +108,6 @@ _LIBCPP_ALWAYS_INLINE int fpclassify( double num ) return _fpclass(num); } -#endif // _MSC_VER +#endif // _LIBCPP_MSVCRT #endif // _LIBCPP_SUPPORT_WIN32_MATH_WIN32_H -- cgit v1.2.3