summaryrefslogtreecommitdiffstats
path: root/libcxx/include/support
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-09-08 20:52:48 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-09-08 20:52:48 +0000
commit0fbd53434d12bec52a01703218e4a1950911fe1d (patch)
treef2d21341732dd23f387507a44f721d22239b036b /libcxx/include/support
parenta1218728d325e8e833b596438888f1dda0f68fa2 (diff)
downloadbcm5719-llvm-0fbd53434d12bec52a01703218e4a1950911fe1d.tar.gz
bcm5719-llvm-0fbd53434d12bec52a01703218e4a1950911fe1d.zip
support: clean up MSVC support
Visual Studio 2013 (CRT version 12) added support for many C99 long long and long double functions. Visual Studio 2015 (CRT version 14) increased C99 and C11 compliance further. Since we don't support Visual Studio versions older than 2013, we can considerably clean up the support header. Patch by Shoaib Meenai! llvm-svn: 280988
Diffstat (limited to 'libcxx/include/support')
-rw-r--r--libcxx/include/support/win32/support.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/libcxx/include/support/win32/support.h b/libcxx/include/support/win32/support.h
index 5765babcd13..6a5763b5e49 100644
--- a/libcxx/include/support/win32/support.h
+++ b/libcxx/include/support/win32/support.h
@@ -22,7 +22,7 @@
#include <intrin.h>
#endif
#if defined(_LIBCPP_MSVCRT)
-#include <xlocinfo.h>
+#include <crtversion.h>
#endif
#define swprintf _snwprintf
#define vswprintf _vsnwprintf
@@ -44,26 +44,8 @@ size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
}
#endif // __MINGW32__
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14
#define snprintf _snprintf
-#define atoll _atoi64
-#define strtoll _strtoi64
-#define strtoull _strtoui64
-#define wcstoll _wcstoi64
-#define wcstoull _wcstoui64
-_LIBCPP_ALWAYS_INLINE float strtof(const char *nptr, char **endptr)
-{
- return _Stof(nptr, endptr, 0);
-}
-_LIBCPP_ALWAYS_INLINE double strtod(const char *nptr, char **endptr)
-{
- return _Stod(nptr, endptr, 0);
-}
-_LIBCPP_ALWAYS_INLINE long double strtold(const char *nptr, char **endptr)
-{
- return _Stold(nptr, endptr, 0);
-}
-
#define _Exit _exit
#endif
OpenPOWER on IntegriCloud