This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: New AIX failures
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: bkoz at nabi dot net
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 04 Jun 2002 14:06:41 -0400
- Subject: Re: New AIX failures
It appears that AIX prefers the use of toupper and tolower. I am
not exactly sure how to initialize _M_toupper and _M_tolower for AIX.
Would the following patch bringing AIX ctype_noninline.h inline
with the "generic" definition be correct?
Thanks, David
Index: ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/aix/bits/ctype_noninline.h,v
retrieving revision 1.9
diff -c -p -r1.9 ctype_noninline.h
*** ctype_noninline.h 22 Jan 2002 16:09:24 -0000 1.9
--- ctype_noninline.h 4 Jun 2002 17:59:04 -0000
***************
*** 41,65 ****
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
! _M_table(__table ? __table : classic_table())
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
! _M_table(__table ? __table : classic_table())
{ }
char
ctype<char>::do_toupper(char __c) const
! { return _toupper(__c); }
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
! *__low = this->do_toupper(*__low);
++__low;
}
return __high;
--- 41,65 ----
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
! _M_table(__table == 0 ? classic_table() : __table)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
! _M_table(__table == 0 ? classic_table() : __table)
{ }
char
ctype<char>::do_toupper(char __c) const
! { return ::toupper((int) __c); }
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
! *__low = ::toupper((int) *__low);
++__low;
}
return __high;
***************
*** 67,80 ****
char
ctype<char>::do_tolower(char __c) const
! { return _tolower(__c); }
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
! *__low = this->do_tolower(*__low);
++__low;
}
return __high;
--- 67,80 ----
char
ctype<char>::do_tolower(char __c) const
! { return ::tolower((int) __c); }
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
! *__low = ::tolower((int) *__low);
++__low;
}
return __high;