diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-31 22:14:05 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-31 22:14:05 +0000 |
commit | 1ec026252b3027f06c8a561d93fc0a3801107bba (patch) | |
tree | 1f2f3fb8bb2fcac2fa57ada4189b42c73f0d0fe4 /libcxx/include/support/win32 | |
parent | 27db230ab05a685268b94f7296a99d380ab04611 (diff) | |
download | bcm5719-llvm-1ec026252b3027f06c8a561d93fc0a3801107bba.tar.gz bcm5719-llvm-1ec026252b3027f06c8a561d93fc0a3801107bba.zip |
Fix Libc++ build with MinGW64
Summary: This patch corrects the build errors I encountered when building on MinGW64.
Reviewers: mati865, rnk, compnerd, smeenai, bcraig
Reviewed By: mati865, smeenai
Subscribers: martell, chapuni, cfe-commits
Differential Revision: https://reviews.llvm.org/D33082
llvm-svn: 304360
Diffstat (limited to 'libcxx/include/support/win32')
-rw-r--r-- | libcxx/include/support/win32/locale_win32.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libcxx/include/support/win32/locale_win32.h b/libcxx/include/support/win32/locale_win32.h index 7a6c44ca900..b2b3ac4c799 100644 --- a/libcxx/include/support/win32/locale_win32.h +++ b/libcxx/include/support/win32/locale_win32.h @@ -52,20 +52,21 @@ size_t wcsnrtombs_l( char *__restrict dst, const wchar_t **__restrict src, size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc); wint_t btowc_l( int c, locale_t loc ); int wctob_l( wint_t c, locale_t loc ); -inline _LIBCPP_ALWAYS_INLINE -decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ) -{ - return ___mb_cur_max_l_func(__l); -} + +decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ); // the *_l functions are prefixed on Windows, only available for msvcr80+, VS2005+ #define mbtowc_l _mbtowc_l #define strtoll_l _strtoi64_l #define strtoull_l _strtoui64_l -#define strtof_l _strtof_l #define strtod_l _strtod_l +#if defined(_LIBCPP_MSVCRT) +#define strtof_l _strtof_l #define strtold_l _strtold_l - +#else +float strtof_l(const char*, char**, locale_t); +long double strtold_l(const char*, char**, locale_t); +#endif inline _LIBCPP_INLINE_VISIBILITY int islower_l(int c, _locale_t loc) |