Fix signatures of fallback tow(upper|lower)_l.
authorDan Albert <danalbert@google.com>
Mon, 19 Sep 2016 20:42:57 +0000 (20:42 +0000)
committerDan Albert <danalbert@google.com>
Mon, 19 Sep 2016 20:42:57 +0000 (20:42 +0000)
Summary:
These functions take and return wint_t, not int:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/towupper.html

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D24743

llvm-svn: 281936

libcxx/include/support/xlocale/__posix_l_fallback.h

index 8bf9567..c893a67 100644 (file)
@@ -124,11 +124,11 @@ inline _LIBCPP_ALWAYS_INLINE int tolower_l(int c, locale_t) {
   return ::tolower(c);
 }
 
-inline _LIBCPP_ALWAYS_INLINE int towupper_l(int c, locale_t) {
+inline _LIBCPP_ALWAYS_INLINE wint_t towupper_l(wint_t c, locale_t) {
   return ::towupper(c);
 }
 
-inline _LIBCPP_ALWAYS_INLINE int towlower_l(int c, locale_t) {
+inline _LIBCPP_ALWAYS_INLINE wint_t towlower_l(wint_t c, locale_t) {
   return ::towlower(c);
 }