[v3] fix ctype breakage

Benjamin Kosnik bkoz@redhat.com
Sun Jan 20 20:32:00 GMT 2002


Forgot about static initialization issues, as surprising as that may
sound. This fixes the problem and simplifies the whole classic table
issue.

tested x86-linux, generic locale
tested x86-linux, gnu locale


2002-01-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (ctype<char>::classic_table):
	Remove definition.
	(ctype<char>::_S_ctable): Remove.
	* config/os/gnu-linux/bits/ctype_noninline.h
	(ctype<char>::_S_table): Remove definition.
	(ctype<char>::classic_table): Define.
	(ctype<char>::ctype): Replace _S_ctable with classic_table().
	* config/os/aix/bits/ctype_noninline.h: Same.
	* config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
	* config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
	* config/os/djgpp/bits/ctype_noninline.h: Same.
	* config/os/generic/bits/ctype_noninline.h: Same.
	* config/os/gnu-linux/bits/ctype_noninline.h: Same.
	* config/os/hpux/bits/ctype_noninline.h: Same.
	* config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
	* config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
	* config/os/mingw32/bits/ctype_noninline.h: Same.
	* config/os/newlib/bits/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.

Index: config/os/aix/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/aix/bits/ctype_noninline.h,v
retrieving revision 1.7
diff -c -p -r1.7 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:37	1.7
--- ctype_noninline.h	2002/01/21 04:02:20
***************
*** 33,50 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
!   
    ctype<char>::ctype(__c_locale, 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 : _S_ctable) 
    { }
  
    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 : _S_ctable) 
    { }
  
    char
--- 33,51 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
! 
    ctype<char>::ctype(__c_locale, 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()) 
    { }
  
    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
Index: config/os/bsd/freebsd/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/bsd/freebsd/bits/ctype_noninline.h,v
retrieving revision 1.5
diff -c -p -r1.5 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:37	1.5
--- ctype_noninline.h	2002/01/21 04:02:20
***************
*** 33,50 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, 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 : _S_ctable) 
    { }
  
    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 : _S_ctable) 
    { }
  
    char
--- 33,51 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
  
    ctype<char>::ctype(__c_locale, 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()) 
    { }
  
    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
Index: config/os/bsd/netbsd/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/bsd/netbsd/bits/ctype_noninline.h,v
retrieving revision 1.5
diff -c -p -r1.5 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:38	1.5
--- ctype_noninline.h	2002/01/21 04:02:20
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs) 
--- 33,41 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs) 
Index: config/os/djgpp/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/djgpp/bits/ctype_noninline.h,v
retrieving revision 1.6
diff -c -p -r1.6 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:38	1.6
--- ctype_noninline.h	2002/01/21 04:02:21
***************
*** 33,40 ****
    
  // Information as gleaned from DJGPP <ctype.h>
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, const mask* __table = 0, bool __del = false, 
  		     size_t __refs = 0) 
--- 33,41 ----
    
  // Information as gleaned from DJGPP <ctype.h>
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
  
    ctype<char>::ctype(__c_locale, const mask* __table = 0, bool __del = false, 
  		     size_t __refs = 0) 
Index: config/os/generic/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/generic/bits/ctype_noninline.h,v
retrieving revision 1.7
diff -c -p -r1.7 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:38	1.7
--- ctype_noninline.h	2002/01/21 04:02:21
***************
*** 34,53 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
!   
    ctype<char>::ctype(__c_locale, 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 ? _S_ctable : __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 ? _S_ctable : __table) 
    { }
  
    char
--- 34,54 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
! 
    ctype<char>::ctype(__c_locale, 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) 
    { }
  
    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
Index: config/os/gnu-linux/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h,v
retrieving revision 1.8
diff -c -p -r1.8 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:39	1.8
--- ctype_noninline.h	2002/01/21 04:02:21
***************
*** 40,48 ****
    using _C_legacy::__ctype_b;
  #endif
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable = __ctype_b;
! 
  #if _GLIBCPP_C_LOCALE_GNU
    ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del, 
  		     size_t __refs) 
--- 40,49 ----
    using _C_legacy::__ctype_b;
  #endif
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return __ctype_b; }  
!   
  #if _GLIBCPP_C_LOCALE_GNU
    ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del, 
  		     size_t __refs) 
***************
*** 58,71 ****
  		     size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
!   _M_table(__table ? __table : _S_ctable)
    { _M_c_locale_ctype = NULL; }
  #endif
  
    ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) : 
    __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
!   _M_table(__table ? __table : _S_ctable)
    { _M_c_locale_ctype = NULL; }
  
    char
--- 59,72 ----
  		     size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
!   _M_table(__table ? __table : classic_table())
    { _M_c_locale_ctype = NULL; }
  #endif
  
    ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) : 
    __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
!   _M_table(__table ? __table : classic_table())
    { _M_c_locale_ctype = NULL; }
  
    char
Index: config/os/hpux/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/hpux/bits/ctype_noninline.h,v
retrieving revision 1.7
diff -c -p -r1.7 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:39	1.7
--- ctype_noninline.h	2002/01/21 04:02:21
***************
*** 34,42 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
!   
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
--- 34,43 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
! 
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
Index: config/os/irix/irix5.2/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:39	1.3
--- ctype_noninline.h	2002/01/21 04:02:22
***************
*** 34,41 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs)
--- 34,42 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs)
Index: config/os/irix/irix6.5/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h,v
retrieving revision 1.4
diff -c -p -r1.4 ctype_noninline.h
*** ctype_noninline.h	2002/01/18 04:29:28	1.4
--- ctype_noninline.h	2002/01/21 04:02:22
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs)
--- 33,41 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs)
Index: config/os/mingw32/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/mingw32/bits/ctype_noninline.h,v
retrieving revision 1.2
diff -c -p -r1.2 ctype_noninline.h
*** ctype_noninline.h	2002/01/16 19:57:29	1.2
--- ctype_noninline.h	2002/01/21 04:02:22
***************
*** 1,6 ****
  // Locale support -*- C++ -*-
  
! // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // Locale support -*- C++ -*-
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 33,58 ****
    
  // Information as gleaned from /mingw32/include/ctype.h.
  
! // This should be in mingw's ctype.h but isn't in older versions
  
-   extern "C"  unsigned short*  __declspec(dllimport) _pctype;  
- 
    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_ctable(NULL), _M_table(__table == 0 ? (_pctype) : __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;
--- 33,69 ----
    
  // Information as gleaned from /mingw32/include/ctype.h.
  
!   // This should be in mingw's ctype.h but isn't in older versions
!   // Static classic C-locale table.  _ctype[0] is EOF
!   extern "C"  unsigned short  __declspec(dllimport) _ctype[];
! 
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return _ctype + 1; }  
! 
!   ctype<char>::ctype(__c_locale, const mask* __table = 0, bool __del = false, 
! 		     size_t __refs = 0) 
!   : __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 (this->is(ctype_base::lower, __c) ? (__c - 'a' + 'A') : __c); }
  
    const char*
    ctype<char>::do_toupper(char* __low, const char* __high) const
    {
      while (__low < __high)
        {
! 	*__low = this->do_toupper(*__low);
  	++__low;
        }
      return __high;
***************
*** 60,75 ****
  
    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;
    }
  
--- 71,89 ----
  
    char
    ctype<char>::do_tolower(char __c) const
!   { return (this->is(ctype_base::upper, __c) ? (__c - 'A' + 'a') : __c); }
  
    const char* 
    ctype<char>::do_tolower(char* __low, const char* __high) const
    {
      while (__low < __high)
        {
! 	*__low = this->do_tolower(*__low);
  	++__low;
        }
      return __high;
    }
+ 
+ 
+ 
  
Index: config/os/newlib/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/newlib/bits/ctype_noninline.h,v
retrieving revision 1.7
diff -c -p -r1.7 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:40	1.7
--- ctype_noninline.h	2002/01/21 04:02:22
***************
*** 33,52 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, 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 : _S_ctable) 
    { }
  
    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 : _S_ctable) 
    { }
  
    char
--- 33,53 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
  
    ctype<char>::ctype(__c_locale, 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()) 
    { }
  
    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
Index: config/os/solaris/solaris2.5/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/solaris/solaris2.5/bits/ctype_noninline.h,v
retrieving revision 1.6
diff -c -p -r1.6 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:40	1.6
--- ctype_noninline.h	2002/01/21 04:02:23
***************
*** 33,52 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
!   
    ctype<char>::ctype(__c_locale, 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 : _S_ctable) 
    { }
  
    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 : _S_ctable) 
    { }
  
    char
--- 33,53 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }
! 
    ctype<char>::ctype(__c_locale, 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()) 
    { }
  
    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
Index: config/os/solaris/solaris2.6/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/solaris/solaris2.6/bits/ctype_noninline.h,v
retrieving revision 1.7
diff -c -p -r1.7 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 09:56:42	1.7
--- ctype_noninline.h	2002/01/21 04:02:23
***************
*** 33,52 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable;
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__trans_upper), _M_tolower(__trans_lower), 
!   _M_table(__table ? __table : _S_ctable) 
    { }
  
    ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__trans_upper), _M_tolower(__trans_lower), 
!   _M_table(__table ? __table : _S_ctable) 
    { }
  
    char
--- 33,53 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   const ctype_base::mask*
!   ctype<char>::classic_table() throw()
!   { return 0; }  
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs) 
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__trans_upper), _M_tolower(__trans_lower), 
!   _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(__trans_upper), _M_tolower(__trans_lower), 
!   _M_table(__table ? __table : classic_table()) 
    { }
  
    char
Index: config/os/solaris/solaris2.7/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h,v
retrieving revision 1.6
diff -c -p -r1.6 ctype_noninline.h
*** ctype_noninline.h	2002/01/17 03:59:41	1.6
--- ctype_noninline.h	2002/01/21 04:02:23
***************
*** 34,53 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   // Data for classic_table().
!   const ctype_base::mask* ctype<char>::_S_ctable = __ctype_mask;
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs)
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__trans_upper), _M_tolower(__trans_lower),
!   _M_table(__table ? __table : _S_ctable) 
    { }
  
    ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__trans_upper), _M_tolower(__trans_lower),
!   _M_table(__table == 0 ? __table : _S_ctable) 
    { }
  
    char
--- 34,54 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   const ctype_base::mask* 
!   ctype<char>::classic_table() throw()
!   { return __ctype_mask; }
  
    ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  		     size_t __refs)
    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
    _M_toupper(__trans_upper), _M_tolower(__trans_lower),
!   _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(__trans_upper), _M_tolower(__trans_lower),
!   _M_table(__table == 0 ? __table : classic_table()) 
    { }
  
    char
Index: include/bits/locale_facets.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/locale_facets.h,v
retrieving revision 1.37
diff -c -p -r1.37 locale_facets.h
*** locale_facets.h	2002/01/17 03:59:41	1.37
--- locale_facets.h	2002/01/21 04:02:28
*************** namespace std
*** 238,244 ****
      public:
        static locale::id        id;
        static const size_t      table_size = 1 + static_cast<unsigned char>(-1);
-       static const mask*       _S_ctable;
  
        explicit 
        ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
--- 238,243 ----
*************** namespace std
*** 265,272 ****
        { return _M_table; }
  
        static const mask* 
!       classic_table() throw()
!       { return _S_ctable; }
  
        virtual 
        ~ctype();
--- 264,270 ----
        { return _M_table; }
  
        static const mask* 
!       classic_table() throw();
  
        virtual 
        ~ctype();



More information about the Gcc-patches mailing list