From patchwork Thu Mar 31 16:09:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 89117 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 22BCFB6EEA for ; Fri, 1 Apr 2011 06:06:46 +1100 (EST) Received: (qmail 26036 invoked by alias); 31 Mar 2011 19:06:41 -0000 Received: (qmail 25971 invoked by uid 22791); 31 Mar 2011 19:06:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from vsmtp3.tin.it (HELO vsmtp3.tin.it) (212.216.176.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 19:05:48 +0000 Received: from [192.168.1.4] (79.53.21.190) by vsmtp3.tin.it (8.5.132) id 4CFDF4AF08F142BE; Thu, 31 Mar 2011 18:09:52 +0200 Message-ID: <4D94A749.6020001@oracle.com> Date: Thu, 31 Mar 2011 18:09:45 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Fix libstdc++/48382 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, this fixes the PR by implementing the XXX comment in src/ctype.cc. I tested the patch only on x86_64-linux, but (modulo trivial typos) the changes for the other targets should be identical and straightforward. Committed to mainline. Thanks, Paolo. ///////////////////////////// 2011-03-31 Paolo Carlini PR libstdc++/48382 * src/ctype.cc: Do not include . * src/Makefile.am: Add ctype_configure_char.cc to host_sources. * src/Makefile.in: Regenerate. * include/Makefile.am: Remove ctype_noninline.h from host_headers. * include/Makefile.in: Regenerate. * doc/xml/manual/internals.xml: Update. * config/os/newlib/ctype_noninline.h: Fixup and rename to... * config/os/newlib/ctype_configure_char.cc: ... this. * config/os/aix/ctype_noninline.h: Likewise. * config/os/aix/ctype_configure_char.cc: Likewise. * config/os/vxworks/ctype_noninline.h: Likewise. * config/os/vxworks/ctype_configure_char.cc * config/os/hpux/ctype_noninline.h: Likewise. * config/os/hpux/ctype_configure_char.cc: Likewise. * config/os/gnu-linux/ctype_noninline.h: Likewise. * config/os/gnu-linux/ctype_configure_char.cc: Likewise. * config/os/mingw32/ctype_noninline.h: Likewise. * config/os/mingw32/ctype_configure_char.cc: Likewise. * config/os/tpf/ctype_noninline.h: Likewise. * config/os/tpf/ctype_configure_char.cc: Likewise. * config/os/uclibc/ctype_noninline.h: Likewise. * config/os/uclibc/ctype_configure_char.cc: Likewise. * config/os/bionic/ctype_noninline.h: Likewise. * config/os/bionic/ctype_configure_char.cc: Likewise. * config/os/djgpp/ctype_noninline.h: Likewise. * config/os/djgpp/ctype_configure_char.cc: Likewise. * config/os/qnx/qnx6.1/ctype_noninline.h: Likewise. * config/os/qnx/qnx6.1/ctype_configure_char.cc: Likewise. * config/os/bsd/netbsd/ctype_noninline.h: Likewise. * config/os/bsd/netbsd/ctype_configure_char.cc: Likewise. * config/os/bsd/darwin/ctype_noninline.h: Likewise. * config/os/bsd/darwin/ctype_configure_char.cc: Likewise. * config/os/bsd/freebsd/ctype_noninline.h: Likewise. * config/os/bsd/freebsd/ctype_configure_char.cc: Likewise. * config/os/irix/irix6.5/ctype_noninline.h: Likewise. * config/os/irix/irix6.5/ctype_configure_char.cc: Likewise. * config/os/generic/ctype_noninline.h: Likewise. * config/os/generic/ctype_configure_char.cc: Likewise. * config/os/solaris/solaris2.7/ctype_noninline.h: Likewise. * config/os/solaris/solaris2.7/ctype_configure_char.cc: Likewise. Index: src/ctype.cc =================================================================== --- src/ctype.cc (revision 171787) +++ src/ctype.cc (working copy) @@ -1,5 +1,5 @@ // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, -// 2006, 2007, 2008, 2009 +// 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -50,11 +50,6 @@ locale::id ctype::id; #endif - // XXX At some point, just rename this file to ctype_configure_char.cc - // and compile it as a separate file instead of including it here. - // Platform-specific initialization code for ctype tables. -#include - const size_t ctype::table_size; ctype::~ctype() Index: src/Makefile.am =================================================================== --- src/Makefile.am (revision 171787) +++ src/Makefile.am (working copy) @@ -104,6 +104,7 @@ atomicity.cc \ codecvt_members.cc \ collate_members.cc \ + ctype_configure_char.cc \ ctype_members.cc \ messages_members.cc \ monetary_members.cc \ @@ -116,6 +117,9 @@ collate_members.cc: ${glibcxx_srcdir}/$(CCOLLATE_CC) $(LN_S) ${glibcxx_srcdir}/$(CCOLLATE_CC) . || true +ctype_configure_char.cc: ${glibcxx_srcdir}/$(OS_INC_SRCDIR)/ctype_configure_char.cc + $(LN_S) ${glibcxx_srcdir}/$(OS_INC_SRCDIR)/ctype_configure_char.cc . || true + ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC) $(LN_S) ${glibcxx_srcdir}/$(CCTYPE_CC) . || true Index: doc/xml/manual/internals.xml =================================================================== --- doc/xml/manual/internals.xml (revision 171787) +++ doc/xml/manual/internals.xml (working copy) @@ -254,11 +254,8 @@ included before ctype_base.h is included. - The next file to write is ctype_noninline.h, which also does -not require include guards. This file defines a few member functions -that will be included in include/bits/locale_facets.h. The first -function that must be written is the ctype<char>::ctype -constructor. Here is the IRIX example: + The next file to write is ctype_configure_char.cc. +The first function that must be written is the ctype<char>::ctype constructor. Here is the IRIX example: Index: include/Makefile.am =================================================================== --- include/Makefile.am (revision 171787) +++ include/Makefile.am (working copy) @@ -827,7 +827,6 @@ host_headers = \ ${host_srcdir}/ctype_base.h \ ${host_srcdir}/ctype_inline.h \ - ${host_srcdir}/ctype_noninline.h \ ${host_srcdir}/os_defines.h \ ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \ ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h \ Index: config/os/newlib/ctype_noninline.h =================================================================== --- config/os/newlib/ctype_noninline.h (revision 171787) +++ config/os/newlib/ctype_noninline.h (working copy) @@ -1,97 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2000, 2001, 2002, 2009, 2010 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return _ctype_ + 1; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { - int __x = __c; - return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x); - } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = this->do_toupper(*__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { - int __x = __c; - return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x); - } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = this->do_tolower(*__low); - ++__low; - } - return __high; - } Index: config/os/newlib/ctype_configure_char.cc =================================================================== --- config/os/newlib/ctype_configure_char.cc (revision 171779) +++ config/os/newlib/ctype_configure_char.cc (working copy) @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -22,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -95,3 +100,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/aix/ctype_noninline.h =================================================================== --- config/os/aix/ctype_noninline.h (revision 171787) +++ config/os/aix/ctype_noninline.h (working copy) @@ -1,91 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2000, 2001, 2002, 2009, 2010 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return 0; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/aix/ctype_configure_char.cc =================================================================== --- config/os/aix/ctype_configure_char.cc (revision 171782) +++ config/os/aix/ctype_configure_char.cc (working copy) @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -22,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -89,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/vxworks/ctype_noninline.h =================================================================== --- config/os/vxworks/ctype_noninline.h (revision 171787) +++ config/os/vxworks/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from target/h/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return __ctype; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return __toupper(__c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = __toupper(*__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return __tolower(__c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = __tolower(*__low); - ++__low; - } - return __high; - } Index: config/os/vxworks/ctype_configure_char.cc =================================================================== --- config/os/vxworks/ctype_configure_char.cc (revision 171779) +++ config/os/vxworks/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from target/h/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/hpux/ctype_noninline.h =================================================================== --- config/os/hpux/ctype_noninline.h (revision 171787) +++ config/os/hpux/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return __SB_masks; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : (const mask *) __SB_masks) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : (const mask *) __SB_masks) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/hpux/ctype_configure_char.cc =================================================================== --- config/os/hpux/ctype_configure_char.cc (revision 171779) +++ config/os/hpux/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/gnu-linux/ctype_noninline.h =================================================================== --- config/os/gnu-linux/ctype_noninline.h (revision 171787) +++ config/os/gnu-linux/ctype_noninline.h (working copy) @@ -1,190 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - -#if _GLIBCXX_C_LOCALE_GNU - const ctype_base::mask* - ctype::classic_table() throw() - { return _S_get_c_locale()->__ctype_b; } -#else - const ctype_base::mask* - ctype::classic_table() throw() - { - const ctype_base::mask* __ret; - char* __old = setlocale(LC_CTYPE, NULL); - char* __sav = NULL; - if (__builtin_strcmp(__old, "C")) - { - const size_t __len = __builtin_strlen(__old) + 1; - __sav = new char[__len]; - __builtin_memcpy(__sav, __old, __len); - setlocale(LC_CTYPE, "C"); - } -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) - __ret = *__ctype_b_loc(); -#else - __ret = __ctype_b; -#endif - if (__sav) - { - setlocale(LC_CTYPE, __sav); - delete [] __sav; - } - return __ret; - } -#endif - -#if _GLIBCXX_C_LOCALE_GNU - ctype::ctype(__c_locale __cloc, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), - _M_del(__table != 0 && __del), - _M_toupper(_M_c_locale_ctype->__ctype_toupper), - _M_tolower(_M_c_locale_ctype->__ctype_tolower), - _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), - _M_widen_ok(0), _M_narrow_ok(0) - { - __builtin_memset(_M_widen, 0, sizeof(_M_widen)); - __builtin_memset(_M_narrow, 0, sizeof(_M_narrow)); - } -#else - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), - _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) - { - char* __old = setlocale(LC_CTYPE, NULL); - char* __sav = NULL; - if (__builtin_strcmp(__old, "C")) - { - const size_t __len = __builtin_strlen(__old) + 1; - __sav = new char[__len]; - __builtin_memcpy(__sav, __old, __len); - setlocale(LC_CTYPE, "C"); - } -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) - _M_toupper = *__ctype_toupper_loc(); - _M_tolower = *__ctype_tolower_loc(); - _M_table = __table ? __table : *__ctype_b_loc(); -#else - _M_toupper = __ctype_toupper; - _M_tolower = __ctype_tolower; - _M_table = __table ? __table : __ctype_b; -#endif - if (__sav) - { - setlocale(LC_CTYPE, __sav); - delete [] __sav; - } - __builtin_memset(_M_widen, 0, sizeof(_M_widen)); - __builtin_memset(_M_narrow, 0, sizeof(_M_narrow)); - } -#endif - -#if _GLIBCXX_C_LOCALE_GNU - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), - _M_del(__table != 0 && __del), - _M_toupper(_M_c_locale_ctype->__ctype_toupper), - _M_tolower(_M_c_locale_ctype->__ctype_tolower), - _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), - _M_widen_ok(0), _M_narrow_ok(0) - { - __builtin_memset(_M_widen, 0, sizeof(_M_widen)); - __builtin_memset(_M_narrow, 0, sizeof(_M_narrow)); - } -#else - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), - _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) - { - char* __old = setlocale(LC_CTYPE, NULL); - char* __sav = NULL; - if (__builtin_strcmp(__old, "C")) - { - const size_t __len = __builtin_strlen(__old) + 1; - __sav = new char[__len]; - __builtin_memcpy(__sav, __old, __len); - setlocale(LC_CTYPE, "C"); - } -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) - _M_toupper = *__ctype_toupper_loc(); - _M_tolower = *__ctype_tolower_loc(); - _M_table = __table ? __table : *__ctype_b_loc(); -#else - _M_toupper = __ctype_toupper; - _M_tolower = __ctype_tolower; - _M_table = __table ? __table : __ctype_b; -#endif - if (__sav) - { - setlocale(LC_CTYPE, __sav); - delete [] __sav; - } - __builtin_memset(_M_widen, 0, sizeof(_M_widen)); - __builtin_memset(_M_narrow, 0, sizeof(_M_narrow)); - } -#endif - - char - ctype::do_toupper(char __c) const - { return _M_toupper[static_cast(__c)]; } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_toupper[static_cast(*__low)]; - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return _M_tolower[static_cast(__c)]; } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_tolower[static_cast(*__low)]; - ++__low; - } - return __high; - } Index: config/os/gnu-linux/ctype_configure_char.cc =================================================================== --- config/os/gnu-linux/ctype_configure_char.cc (revision 171779) +++ config/os/gnu-linux/ctype_configure_char.cc (working copy) @@ -1,8 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -24,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h #if _GLIBCXX_C_LOCALE_GNU @@ -188,3 +191,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/mingw32/ctype_noninline.h =================================================================== --- config/os/mingw32/ctype_noninline.h (revision 171787) +++ config/os/mingw32/ctype_noninline.h (working copy) @@ -1,236 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2007, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// The classic table used in libstdc++ is *not* the C _ctype table -// used by mscvrt, but is based on the ctype masks defined for libstdc++ -// in ctype_base.h. - - const ctype_base::mask* - ctype::classic_table() throw() - { - static const ctype_base::mask _S_classic_table[256] = - { - cntrl /* null */, - cntrl /* ^A */, - cntrl /* ^B */, - cntrl /* ^C */, - cntrl /* ^D */, - cntrl /* ^E */, - cntrl /* ^F */, - cntrl /* ^G */, - cntrl /* ^H */, - ctype_base::mask(space | cntrl) /* tab */, - ctype_base::mask(space | cntrl) /* LF */, - ctype_base::mask(space | cntrl) /* ^K */, - ctype_base::mask(space | cntrl) /* FF */, - ctype_base::mask(space | cntrl) /* ^M */, - cntrl /* ^N */, - cntrl /* ^O */, - cntrl /* ^P */, - cntrl /* ^Q */, - cntrl /* ^R */, - cntrl /* ^S */, - cntrl /* ^T */, - cntrl /* ^U */, - cntrl /* ^V */, - cntrl /* ^W */, - cntrl /* ^X */, - cntrl /* ^Y */, - cntrl /* ^Z */, - cntrl /* esc */, - cntrl /* ^\ */, - cntrl /* ^] */, - cntrl /* ^^ */, - cntrl /* ^_ */, - ctype_base::mask(space | print) /* */, - ctype_base::mask(punct | print) /* ! */, - ctype_base::mask(punct | print) /* " */, - ctype_base::mask(punct | print) /* # */, - ctype_base::mask(punct | print) /* $ */, - ctype_base::mask(punct | print) /* % */, - ctype_base::mask(punct | print) /* & */, - ctype_base::mask(punct | print) /* ' */, - ctype_base::mask(punct | print) /* ( */, - ctype_base::mask(punct | print) /* ) */, - ctype_base::mask(punct | print) /* * */, - ctype_base::mask(punct | print) /* + */, - ctype_base::mask(punct | print) /* , */, - ctype_base::mask(punct | print) /* - */, - ctype_base::mask(punct | print) /* . */, - ctype_base::mask(punct | print) /* / */, - ctype_base::mask(digit | xdigit | print) /* 0 */, - ctype_base::mask(digit | xdigit | print) /* 1 */, - ctype_base::mask(digit | xdigit | print) /* 2 */, - ctype_base::mask(digit | xdigit | print) /* 3 */, - ctype_base::mask(digit | xdigit | print) /* 4 */, - ctype_base::mask(digit | xdigit | print) /* 5 */, - ctype_base::mask(digit | xdigit | print) /* 6 */, - ctype_base::mask(digit | xdigit | print) /* 7 */, - ctype_base::mask(digit | xdigit | print) /* 8 */, - ctype_base::mask(digit | xdigit | print) /* 9 */, - ctype_base::mask(punct | print) /* : */, - ctype_base::mask(punct | print) /* ; */, - ctype_base::mask(punct | print) /* < */, - ctype_base::mask(punct | print) /* = */, - ctype_base::mask(punct | print) /* > */, - ctype_base::mask(punct | print) /* ? */, - ctype_base::mask(punct | print) /* ! */, - ctype_base::mask(alpha | upper | xdigit | print) /* A */, - ctype_base::mask(alpha | upper | xdigit | print) /* B */, - ctype_base::mask(alpha | upper | xdigit | print) /* C */, - ctype_base::mask(alpha | upper | xdigit | print) /* D */, - ctype_base::mask(alpha | upper | xdigit | print) /* E */, - ctype_base::mask(alpha | upper | xdigit | print) /* F */, - ctype_base::mask(alpha | upper | print) /* G */, - ctype_base::mask(alpha | upper | print) /* H */, - ctype_base::mask(alpha | upper | print) /* I */, - ctype_base::mask(alpha | upper | print) /* J */, - ctype_base::mask(alpha | upper | print) /* K */, - ctype_base::mask(alpha | upper | print) /* L */, - ctype_base::mask(alpha | upper | print) /* M */, - ctype_base::mask(alpha | upper | print) /* N */, - ctype_base::mask(alpha | upper | print) /* O */, - ctype_base::mask(alpha | upper | print) /* P */, - ctype_base::mask(alpha | upper | print) /* Q */, - ctype_base::mask(alpha | upper | print) /* R */, - ctype_base::mask(alpha | upper | print) /* S */, - ctype_base::mask(alpha | upper | print) /* T */, - ctype_base::mask(alpha | upper | print) /* U */, - ctype_base::mask(alpha | upper | print) /* V */, - ctype_base::mask(alpha | upper | print) /* W */, - ctype_base::mask(alpha | upper | print) /* X */, - ctype_base::mask(alpha | upper | print) /* Y */, - ctype_base::mask(alpha | upper | print) /* Z */, - ctype_base::mask(punct | print) /* [ */, - ctype_base::mask(punct | print) /* \ */, - ctype_base::mask(punct | print) /* ] */, - ctype_base::mask(punct | print) /* ^ */, - ctype_base::mask(punct | print) /* _ */, - ctype_base::mask(punct | print) /* ` */, - ctype_base::mask(alpha | lower | xdigit | print) /* a */, - ctype_base::mask(alpha | lower | xdigit | print) /* b */, - ctype_base::mask(alpha | lower | xdigit | print) /* c */, - ctype_base::mask(alpha | lower | xdigit | print) /* d */, - ctype_base::mask(alpha | lower | xdigit | print) /* e */, - ctype_base::mask(alpha | lower | xdigit | print) /* f */, - ctype_base::mask(alpha | lower | print) /* g */, - ctype_base::mask(alpha | lower | print) /* h */, - ctype_base::mask(alpha | lower | print) /* i */, - ctype_base::mask(alpha | lower | print) /* j */, - ctype_base::mask(alpha | lower | print) /* k */, - ctype_base::mask(alpha | lower | print) /* l */, - ctype_base::mask(alpha | lower | print) /* m */, - ctype_base::mask(alpha | lower | print) /* n */, - ctype_base::mask(alpha | lower | print) /* o */, - ctype_base::mask(alpha | lower | print) /* p */, - ctype_base::mask(alpha | lower | print) /* q */, - ctype_base::mask(alpha | lower | print) /* r */, - ctype_base::mask(alpha | lower | print) /* s */, - ctype_base::mask(alpha | lower | print) /* t */, - ctype_base::mask(alpha | lower | print) /* u */, - ctype_base::mask(alpha | lower | print) /* v */, - ctype_base::mask(alpha | lower | print) /* w */, - ctype_base::mask(alpha | lower | print) /* x */, - ctype_base::mask(alpha | lower | print) /* y */, - ctype_base::mask(alpha | lower | print) /* x */, - ctype_base::mask(punct | print) /* { */, - ctype_base::mask(punct | print) /* | */, - ctype_base::mask(punct | print) /* } */, - ctype_base::mask(punct | print) /* ~ */, - cntrl /* del (0x7f)*/, - /* The next 128 entries are all 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - return _S_classic_table; - } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return (this->is(ctype_base::lower, __c) ? (__c - 'a' + 'A') : __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = this->do_toupper(*__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return (this->is(ctype_base::upper, __c) ? (__c - 'A' + 'a') : __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = this->do_tolower(*__low); - ++__low; - } - return __high; - } Index: config/os/mingw32/ctype_configure_char.cc =================================================================== --- config/os/mingw32/ctype_configure_char.cc (revision 171779) +++ config/os/mingw32/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2007, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,19 +22,24 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // -// The classic table used in libstdc++ is *not* the C _ctype table -// used by mscvrt, but is based on the ctype masks defined for libstdc++ -// in ctype_base.h. +#include +#include +#include +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // The classic table used in libstdc++ is *not* the C _ctype table + // used by mscvrt, but is based on the ctype masks defined for libstdc++ + // in ctype_base.h. + const ctype_base::mask* ctype::classic_table() throw() { @@ -234,3 +238,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/tpf/ctype_noninline.h =================================================================== --- config/os/tpf/ctype_noninline.h (revision 171787) +++ config/os/tpf/ctype_noninline.h (working copy) @@ -1,113 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { - const ctype_base::mask* __ret; - char* __old = setlocale(LC_CTYPE, NULL); - const size_t __len = __builtin_strlen(__old) + 1; - char* __sav = new char[__len]; - __builtin_memcpy(__sav, __old, __len); - setlocale(LC_CTYPE, "C"); - __ret = *__ctype_b_loc(); - setlocale(LC_CTYPE, __sav); - delete [] __sav; - return __ret; - } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del) - { - char* __old = setlocale(LC_CTYPE, NULL); - const size_t __len = __builtin_strlen(__old) + 1; - char* __sav = new char[__len]; - __builtin_memcpy(__sav, __old, __len); - setlocale(LC_CTYPE, "C"); - _M_toupper = *__ctype_toupper_loc(); - _M_tolower = *__ctype_tolower_loc(); - _M_table = __table ? __table : *__ctype_b_loc(); - setlocale(LC_CTYPE, __sav); - delete [] __sav; - _M_c_locale_ctype = _S_get_c_locale(); - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del) - { - char* __old = setlocale(LC_CTYPE, NULL); - const size_t __len = __builtin_strlen(__old) + 1; - char* __sav = new char[__len]; - __builtin_memcpy(__sav, __old, __len); - setlocale(LC_CTYPE, "C"); - _M_toupper = *__ctype_toupper_loc(); - _M_tolower = *__ctype_tolower_loc(); - _M_table = __table ? __table : *__ctype_b_loc(); - setlocale(LC_CTYPE, __sav); - delete [] __sav; - _M_c_locale_ctype = _S_get_c_locale(); - } - - char - ctype::do_toupper(char __c) const - { return _M_toupper[static_cast(__c)]; } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_toupper[static_cast(*__low)]; - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return _M_tolower[static_cast(__c)]; } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_tolower[static_cast(*__low)]; - ++__low; - } - return __high; - } Index: config/os/tpf/ctype_configure_char.cc =================================================================== --- config/os/tpf/ctype_configure_char.cc (revision 171779) +++ config/os/tpf/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -111,3 +115,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/uclibc/ctype_noninline.h =================================================================== --- config/os/uclibc/ctype_noninline.h (revision 171787) +++ config/os/uclibc/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return __C_ctype_b; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), - _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) - { - _M_toupper = __C_ctype_toupper; - _M_tolower = __C_ctype_tolower; - _M_table = __table ? __table : __C_ctype_b; - memset(_M_widen, 0, sizeof(_M_widen)); - memset(_M_narrow, 0, sizeof(_M_narrow)); - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), - _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) - { - _M_toupper = __C_ctype_toupper; - _M_tolower = __C_ctype_tolower; - _M_table = __table ? __table : __C_ctype_b; - memset(_M_widen, 0, sizeof(_M_widen)); - memset(_M_narrow, 0, sizeof(_M_narrow)); - } - - char - ctype::do_toupper(char __c) const - { return _M_toupper[static_cast(__c)]; } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_toupper[static_cast(*__low)]; - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return _M_tolower[static_cast(__c)]; } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_tolower[static_cast(*__low)]; - ++__low; - } - return __high; - } Index: config/os/uclibc/ctype_configure_char.cc =================================================================== --- config/os/uclibc/ctype_configure_char.cc (revision 171779) +++ config/os/uclibc/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/bionic/ctype_noninline.h =================================================================== --- config/os/bionic/ctype_noninline.h (revision 171787) +++ config/os/bionic/ctype_noninline.h (working copy) @@ -1,98 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2010 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return _ctype_ + 1; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { - int __x = __c; - return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x); - } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = this->do_toupper(*__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { - int __x = __c; - return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x); - } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = this->do_tolower(*__low); - ++__low; - } - return __high; - } - Index: config/os/bionic/ctype_configure_char.cc =================================================================== --- config/os/bionic/ctype_configure_char.cc (revision 171779) +++ config/os/bionic/ctype_configure_char.cc (working copy) @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -22,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -96,3 +101,5 @@ return __high; } +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/djgpp/ctype_noninline.h =================================================================== --- config/os/djgpp/ctype_noninline.h (revision 171787) +++ config/os/djgpp/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from DJGPP - - const ctype_base::mask* - ctype::classic_table() throw() - { return __dj_ctype_flags+1; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return _M_toupper[static_cast(__c)]; } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_toupper[static_cast(*__low)]; - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return _M_tolower[static_cast(__c)]; } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_tolower[static_cast(*__low)]; - ++__low; - } - return __high; - } Index: config/os/djgpp/ctype_configure_char.cc =================================================================== --- config/os/djgpp/ctype_configure_char.cc (revision 171779) +++ config/os/djgpp/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from DJGPP const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/qnx/qnx6.1/ctype_noninline.h =================================================================== --- config/os/qnx/qnx6.1/ctype_noninline.h (revision 171787) +++ config/os/qnx/qnx6.1/ctype_noninline.h (working copy) @@ -1,89 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2002, 2009, 2010 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return 0; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/qnx/qnx6.1/ctype_configure_char.cc =================================================================== --- config/os/qnx/qnx6.1/ctype_configure_char.cc (revision 171779) +++ config/os/qnx/qnx6.1/ctype_configure_char.cc (working copy) @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -22,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -87,3 +92,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/bsd/netbsd/ctype_noninline.h =================================================================== --- config/os/bsd/netbsd/ctype_noninline.h (revision 171787) +++ config/os/bsd/netbsd/ctype_noninline.h (working copy) @@ -1,94 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - extern "C" const u_int8_t _C_ctype_[]; - - const ctype_base::mask* - ctype::classic_table() throw() - { return _C_ctype_ + 1; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/bsd/netbsd/ctype_configure_char.cc =================================================================== --- config/os/bsd/netbsd/ctype_configure_char.cc (revision 171779) +++ config/os/bsd/netbsd/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h extern "C" const u_int8_t _C_ctype_[]; @@ -92,3 +96,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/bsd/darwin/ctype_noninline.h =================================================================== --- config/os/bsd/darwin/ctype_noninline.h (revision 171787) +++ config/os/bsd/darwin/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2000, 2001, 2002, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return 0; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/bsd/darwin/ctype_configure_char.cc =================================================================== --- config/os/bsd/darwin/ctype_configure_char.cc (revision 171779) +++ config/os/bsd/darwin/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/bsd/freebsd/ctype_noninline.h =================================================================== --- config/os/bsd/freebsd/ctype_noninline.h (revision 171787) +++ config/os/bsd/freebsd/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 2000, 2001, 2002, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return 0; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/bsd/freebsd/ctype_configure_char.cc =================================================================== --- config/os/bsd/freebsd/ctype_configure_char.cc (revision 171779) +++ config/os/bsd/freebsd/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/irix/irix6.5/ctype_noninline.h =================================================================== --- config/os/irix/irix6.5/ctype_noninline.h (revision 171787) +++ config/os/irix/irix6.5/ctype_noninline.h (working copy) @@ -1,94 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return 0; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(!__table ? - (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(!__table ? - (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return _toupper(__c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = do_toupper(*__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return _tolower(__c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = do_tolower(*__low); - ++__low; - } - return __high; - } Index: config/os/irix/irix6.5/ctype_configure_char.cc =================================================================== --- config/os/irix/irix6.5/ctype_configure_char.cc (revision 171779) +++ config/os/irix/irix6.5/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -92,3 +96,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/generic/ctype_noninline.h =================================================================== --- config/os/generic/ctype_noninline.h (revision 171787) +++ config/os/generic/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return 0; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(NULL), _M_tolower(NULL), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::toupper((int) *__low); - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = ::tolower((int) *__low); - ++__low; - } - return __high; - } Index: config/os/generic/ctype_configure_char.cc =================================================================== --- config/os/generic/ctype_configure_char.cc (revision 171779) +++ config/os/generic/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace Index: config/os/solaris/solaris2.7/ctype_noninline.h =================================================================== --- config/os/solaris/solaris2.7/ctype_noninline.h (revision 171787) +++ config/os/solaris/solaris2.7/ctype_noninline.h (working copy) @@ -1,92 +0,0 @@ -// Locale support -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ - -// -// ISO C++ 14882: 22.1 Locales -// - -// Information as gleaned from /usr/include/ctype.h - - const ctype_base::mask* - ctype::classic_table() throw() - { return __ctype_mask; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(__trans_upper), _M_tolower(__trans_lower), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), - _M_toupper(__trans_upper), _M_tolower(__trans_lower), - _M_table(__table ? __table : classic_table()) - { - memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; - memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; - } - - char - ctype::do_toupper(char __c) const - { return _M_toupper[static_cast(__c)]; } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_toupper[static_cast(*__low)]; - ++__low; - } - return __high; - } - - char - ctype::do_tolower(char __c) const - { return _M_tolower[static_cast(__c)]; } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { - *__low = _M_tolower[static_cast(*__low)]; - ++__low; - } - return __high; - } Index: config/os/solaris/solaris2.7/ctype_configure_char.cc =================================================================== --- config/os/solaris/solaris2.7/ctype_configure_char.cc (revision 171779) +++ config/os/solaris/solaris2.7/ctype_configure_char.cc (working copy) @@ -1,7 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -23,15 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/ctype_noninline.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{locale} - */ +/** @file ctype_configure_char.cc */ // // ISO C++ 14882: 22.1 Locales // - + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Information as gleaned from /usr/include/ctype.h const ctype_base::mask* @@ -90,3 +94,6 @@ } return __high; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace