diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2014-10-20 13:34:10 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2014-10-20 13:34:10 +0100 |
commit | a3e4cd810c6f84e1b47f14dec2d3cba2985f9794 (patch) | |
tree | 65190088e95fb0df82c64df80812b362e21805e7 /libstdc++-v3/src/c++98 | |
parent | b0b4483eef86460ae7497e39a3dc92030d1820a2 (diff) | |
download | gcc-a3e4cd810c6f84e1b47f14dec2d3cba2985f9794.zip gcc-a3e4cd810c6f84e1b47f14dec2d3cba2985f9794.tar.gz gcc-a3e4cd810c6f84e1b47f14dec2d3cba2985f9794.tar.bz2 |
Makefile.am: Move ctype.cc, ctype_configure_char.cc and ctype_members.cc to ...
* src/c++98/Makefile.am: Move ctype.cc, ctype_configure_char.cc and
ctype_members.cc to ...
* src/c++11/Makefile.am: Here.
* src/c++98/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++98/ctype.cc: Move file to ...
* src/c++11/ctype.cc: Here, define ctype_base::blank.
* config/abi/pre/gnu.ver: Export ctype_base::blank.
* config/locale/generic/ctype_members.cc
(ctype<wchar_t>::_M_convert_to_wmask): Handle blank. Update comments.
* config/locale/gnu/ctype_members.cc
(ctype<wchar_t>::_M_convert_to_wmask): Likewise.
* config/os/aix/ctype_base.h (ctype_base::blank): Declare.
* config/os/bionic/ctype_base.h (ctype_base::blank): Likewise.
* config/os/bsd/darwin/ctype_base.h (ctype_base::blank): Declare.
* config/os/bsd/darwin/ctype_inline.h (ctype<char>::is): Use blank.
(ctype<wchar_t::do_is): Likewise.
* config/os/bsd/dragonfly/ctype_base.h (ctype_base::blank): Declare.
* config/os/bsd/dragonfly/ctype_inline.h (ctype<char>::is): Use blank.
(ctype<wchar_t::do_is): Likewise.
* config/os/bsd/freebsd/ctype_base.h (ctype_base::blank): Declare.
* config/os/bsd/freebsd/ctype_inline.h (ctype<char>::is): Use blank.
(ctype<wchar_t::do_is): Likewise.
* config/os/bsd/netbsd/ctype_base.h (ctype_base::blank): Declare.
* config/os/bsd/openbsd/ctype_base.h (ctype_base::blank): Likewise.
* config/os/djgpp/ctype_base.h (ctype_base::blank): Likewise.
* config/os/generic/ctype_base.h (ctype_base::blank): Declare.
* config/os/generic/ctype_inline.h (ctype<char>::is): Use blank.
* config/os/gnu-linux/ctype_base.h (ctype_base::blank): Declare.
* config/os/hpux/ctype_base.h (ctype_base::blank): Likewise.
* config/os/mingw32-w64/ctype_base.h (ctype_base::blank): Declare.
* config/os/mingw32-w64/ctype_configure_char.cc
(ctype<char>::classic_table()): Set blank bit for space and tab.
* config/os/mingw32/ctype_base.h (ctype_base::blank): Declare.
* config/os/mingw32/ctype_configure_char.cc
(ctype<char>::classic_table()): Set blank bit for space and tab.
* config/os/newlib/ctype_base.h (ctype_base::blank): Declare.
* config/os/qnx/qnx6.1/ctype_base.h (ctype_base::blank): Likewise.
* config/os/solaris/solaris2.10/ctype_base.h (ctype_base::blank):
Likewise.
* config/os/tpf/ctype_base.h (ctype_base::blank): Likewise.
* config/os/uclibc/ctype_base.h (ctype_base::blank): Likewise.
* config/os/vxworks/ctype_base.h (ctype_base::blank): Likewise.
* include/bits/locale_facets.h (isblank): Define.
* include/bits/localefwd.h (isblank): Declare.
* testsuite/22_locale/classification/isblank.cc: New.
* testsuite/22_locale/ctype_base/blank.cc: New.
From-SVN: r216464
Diffstat (limited to 'libstdc++-v3/src/c++98')
-rw-r--r-- | libstdc++-v3/src/c++98/Makefile.am | 9 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/Makefile.in | 15 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/ctype.cc | 132 |
3 files changed, 3 insertions, 153 deletions
diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am index 6da69f8..9afe904 100644 --- a/libstdc++-v3/src/c++98/Makefile.am +++ b/libstdc++-v3/src/c++98/Makefile.am @@ -33,8 +33,6 @@ host_sources = \ atomicity.cc \ codecvt_members.cc \ collate_members.cc \ - ctype_configure_char.cc \ - ctype_members.cc \ messages_members.cc \ monetary_members.cc \ numeric_members.cc \ @@ -46,12 +44,6 @@ codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC) 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 - messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC) $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true @@ -104,7 +96,6 @@ sources = \ mt_allocator.cc \ codecvt.cc \ complex_io.cc \ - ctype.cc \ globals_io.cc \ hash_tr1.cc \ hashtable_tr1.cc \ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index 38f96cc..9d93792 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -68,8 +68,8 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libc__98convenience_la_LIBADD = am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \ - ctype_configure_char.lo ctype_members.lo messages_members.lo \ - monetary_members.lo numeric_members.lo time_members.lo + messages_members.lo monetary_members.lo numeric_members.lo \ + time_members.lo @ENABLE_EXTERN_TEMPLATE_TRUE@am__objects_2 = allocator-inst.lo \ @ENABLE_EXTERN_TEMPLATE_TRUE@ concept-inst.lo ext-inst.lo \ @ENABLE_EXTERN_TEMPLATE_TRUE@ locale-inst.lo misc-inst.lo \ @@ -78,7 +78,7 @@ am__objects_3 = parallel_settings.lo am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \ $(am__objects_3) am__objects_5 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \ - codecvt.lo complex_io.lo ctype.lo globals_io.lo hash_tr1.lo \ + codecvt.lo complex_io.lo globals_io.lo hash_tr1.lo \ hashtable_tr1.lo ios_failure.lo ios_init.lo ios_locale.lo \ list.lo list-aux.lo list-aux-2.lo list_associated.lo \ list_associated-2.lo locale.lo locale_init.lo locale_facets.lo \ @@ -328,8 +328,6 @@ host_sources = \ atomicity.cc \ codecvt_members.cc \ collate_members.cc \ - ctype_configure_char.cc \ - ctype_members.cc \ messages_members.cc \ monetary_members.cc \ numeric_members.cc \ @@ -364,7 +362,6 @@ sources = \ mt_allocator.cc \ codecvt.cc \ complex_io.cc \ - ctype.cc \ globals_io.cc \ hash_tr1.cc \ hashtable_tr1.cc \ @@ -699,12 +696,6 @@ codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC) 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 - messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC) $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true diff --git a/libstdc++-v3/src/c++98/ctype.cc b/libstdc++-v3/src/c++98/ctype.cc deleted file mode 100644 index ffeeafc..0000000 --- a/libstdc++-v3/src/c++98/ctype.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 1997-2014 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 -// <http://www.gnu.org/licenses/>. - -#include <locale> -#include <cstdlib> -#include <cstring> - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - // Definitions for static const data members of ctype_base. - const ctype_base::mask ctype_base::space; - const ctype_base::mask ctype_base::print; - const ctype_base::mask ctype_base::cntrl; - const ctype_base::mask ctype_base::upper; - const ctype_base::mask ctype_base::lower; - const ctype_base::mask ctype_base::alpha; - const ctype_base::mask ctype_base::digit; - const ctype_base::mask ctype_base::punct; - const ctype_base::mask ctype_base::xdigit; - const ctype_base::mask ctype_base::alnum; - const ctype_base::mask ctype_base::graph; - - // Definitions for locale::id of standard facets that are specialized. - locale::id ctype<char>::id; - -#ifdef _GLIBCXX_USE_WCHAR_T - locale::id ctype<wchar_t>::id; -#endif - - const size_t ctype<char>::table_size; - - ctype<char>::~ctype() - { - _S_destroy_c_locale(_M_c_locale_ctype); - if (_M_del) - delete[] this->table(); - } - - // Fill in the narrowing cache and flag whether all values are - // valid or not. _M_narrow_ok is set to 2 if memcpy can't - // be used. - void - ctype<char>:: - _M_narrow_init() const - { - char __tmp[sizeof(_M_narrow)]; - for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) - __tmp[__i] = __i; - do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow); - - _M_narrow_ok = 1; - if (__builtin_memcmp(__tmp, _M_narrow, sizeof(_M_narrow))) - _M_narrow_ok = 2; - else - { - // Deal with the special case of zero: renarrow with a - // different default and compare. - char __c; - do_narrow(__tmp, __tmp + 1, 1, &__c); - if (__c == 1) - _M_narrow_ok = 2; - } - } - - void - ctype<char>:: - _M_widen_init() const - { - char __tmp[sizeof(_M_widen)]; - for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) - __tmp[__i] = __i; - do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); - - _M_widen_ok = 1; - // Set _M_widen_ok to 2 if memcpy can't be used. - if (__builtin_memcmp(__tmp, _M_widen, sizeof(_M_widen))) - _M_widen_ok = 2; - } - -#ifdef _GLIBCXX_USE_WCHAR_T - ctype<wchar_t>::ctype(size_t __refs) - : __ctype_abstract_base<wchar_t>(__refs), - _M_c_locale_ctype(_S_get_c_locale()), _M_narrow_ok(false) - { _M_initialize_ctype(); } - - ctype<wchar_t>::ctype(__c_locale __cloc, size_t __refs) - : __ctype_abstract_base<wchar_t>(__refs), - _M_c_locale_ctype(_S_clone_c_locale(__cloc)), _M_narrow_ok(false) - { _M_initialize_ctype(); } - - ctype<wchar_t>::~ctype() - { _S_destroy_c_locale(_M_c_locale_ctype); } - - ctype_byname<wchar_t>::ctype_byname(const char* __s, size_t __refs) - : ctype<wchar_t>(__refs) - { - if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) - { - this->_S_destroy_c_locale(this->_M_c_locale_ctype); - this->_S_create_c_locale(this->_M_c_locale_ctype, __s); - this->_M_initialize_ctype(); - } - } - - ctype_byname<wchar_t>::~ctype_byname() - { } - -#endif - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace |