libstdc++v3: Fix OS/2 build breaks with enabled wchar_t specialisations.

Regression of 2eafb76.

Closes #16.
This commit is contained in:
Dmitriy Kuminov
2020-03-17 23:24:21 +03:00
parent 2c58f6b97e
commit cf3ddd69a7
2 changed files with 15 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __hi;
}
#ifndef _GLIBCXX_CTYPE_WCHAR_T_DO_IS_DEFINED
bool
ctype<wchar_t>::
do_is(mask __m, char_type __c) const
@@ -186,6 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
++__lo;
return __lo;
}
#endif // _GLIBCXX_CTYPE_WCHAR_T_DO_IS_DEFINED
wchar_t
ctype<wchar_t>::
@@ -205,6 +207,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __hi;
}
#if defined(__WCHAR_MIN__) && __WCHAR_MIN__ == 0
// Disable wc >= 0 warnings for unsigned wchar_t.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif
char
ctype<wchar_t>::
do_narrow(wchar_t __wc, char __dfault) const
@@ -244,6 +252,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __hi;
}
#if defined(__WCHAR_MIN__) && __WCHAR_MIN__ == 0
#pragma GCC diagnostic pop
#endif
void
ctype<wchar_t>::_M_initialize_ctype() throw()
{

View File

@@ -33,4 +33,7 @@
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
// We have ctype::do_is and do_scan* specialised in ctype_inline.h.
#define _GLIBCXX_CTYPE_WCHAR_T_DO_IS_DEFINED 1
#endif