From a5733b3ad3695aed8f7676165dabe3da7f49d78c Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 12 Apr 2013 20:22:57 +0000 Subject: [PATCH] Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179408 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/support/win32/locale_win32.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/support/win32/locale_win32.h b/include/support/win32/locale_win32.h index e035420f..019586c0 100644 --- a/include/support/win32/locale_win32.h +++ b/include/support/win32/locale_win32.h @@ -65,8 +65,21 @@ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ) #define strtoull_l _strtoui64_l // FIXME: current msvcrt does not know about long double #define strtold_l _strtod_l -#define islower_l _islower_l -#define isupper_l _isupper_l + +inline _LIBCPP_INLINE_VISIBILITY +int +islower_l(int c, _locale_t loc) +{ + return _islower_l((int)c, loc); +} + +inline _LIBCPP_INLINE_VISIBILITY +int +isupper_l(int c, _locale_t loc) +{ + return _isupper_l((int)c, loc); +} + #define isdigit_l _isdigit_l #define isxdigit_l _isxdigit_l #define strcoll_l _strcoll_l