Makefile.am: Move ctype.cc, ctype_configure_char.cc and ctype_members.cc to ...
authorJonathan Wakely <jwakely@redhat.com>
Mon, 20 Oct 2014 12:34:10 +0000 (13:34 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 20 Oct 2014 12:34:10 +0000 (13:34 +0100)
* 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

39 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/config/locale/generic/ctype_members.cc
libstdc++-v3/config/locale/gnu/ctype_members.cc
libstdc++-v3/config/os/aix/ctype_base.h
libstdc++-v3/config/os/bionic/ctype_base.h
libstdc++-v3/config/os/bsd/darwin/ctype_base.h
libstdc++-v3/config/os/bsd/darwin/ctype_inline.h
libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h
libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h
libstdc++-v3/config/os/bsd/freebsd/ctype_base.h
libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h
libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
libstdc++-v3/config/os/bsd/openbsd/ctype_base.h
libstdc++-v3/config/os/djgpp/ctype_base.h
libstdc++-v3/config/os/generic/ctype_base.h
libstdc++-v3/config/os/generic/ctype_inline.h
libstdc++-v3/config/os/gnu-linux/ctype_base.h
libstdc++-v3/config/os/hpux/ctype_base.h
libstdc++-v3/config/os/mingw32-w64/ctype_base.h
libstdc++-v3/config/os/mingw32-w64/ctype_configure_char.cc
libstdc++-v3/config/os/mingw32/ctype_base.h
libstdc++-v3/config/os/mingw32/ctype_configure_char.cc
libstdc++-v3/config/os/newlib/ctype_base.h
libstdc++-v3/config/os/qnx/qnx6.1/ctype_base.h
libstdc++-v3/config/os/solaris/solaris2.10/ctype_base.h
libstdc++-v3/config/os/tpf/ctype_base.h
libstdc++-v3/config/os/uclibc/ctype_base.h
libstdc++-v3/config/os/vxworks/ctype_base.h
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/include/bits/localefwd.h
libstdc++-v3/src/c++11/Makefile.am
libstdc++-v3/src/c++11/Makefile.in
libstdc++-v3/src/c++11/ctype.cc [new file with mode: 0644]
libstdc++-v3/src/c++98/Makefile.am
libstdc++-v3/src/c++98/Makefile.in
libstdc++-v3/src/c++98/ctype.cc [deleted file]
libstdc++-v3/testsuite/22_locale/classification/isblank.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype_base/blank.cc [new file with mode: 0644]

index fcaaea010cef4c3f0506b23b9e08c41ed09c7d04..e00b071ec44f6e100d09a53f775b46e21dab87ee 100644 (file)
@@ -1,3 +1,53 @@
+2014-10-16  Jonathan Wakely  <jwakely@redhat.com>
+
+       * 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.
+
 2014-10-19  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
 
        * testsuite/lib/libstdc++.exp (v3-copy-file): New proc split from ...
index 0559444a87b81d844cc6a09471fc9dce7b094042..4c6d994197fe26b2a4a4f9d8271e6ffd6dbd6557 100644 (file)
@@ -513,7 +513,7 @@ GLIBCXX_3.4 {
     _ZNSt5ctypeI[cw]*;
 
     # std::ctype_base
-    _ZNSt10ctype_base*;
+    _ZNSt10ctype_base[56][ac-z]*;
 
     # std::ctype_byname
     _ZNSt12ctype_bynameI[cw]*;
@@ -1473,6 +1473,9 @@ GLIBCXX_3.4.21 {
     # std::basic_ios::operator bool() const
     _ZNKSt9basic_iosI[cw]St11char_traitsI[cw]EEcvbEv;
 
+    # std::ctype_base::blank
+    _ZNSt10ctype_base5blankE;
+
 } GLIBCXX_3.4.20;
 
 
index 126c0f36b4fe5e0cce2ea73b353017e96f1e44be..367a8931a55ea152f04e09c3c530b4b192024eb9 100644 (file)
@@ -93,7 +93,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        __ret = wctype("graph");
        break;
       default:
-       __ret = __wmask_type();
+       // For some targets ctype_base::blank == ctype_base::space so check
+       // here to avoid a duplicate case error.
+       if (__m == blank)
+         __ret = wctype("blank");
+       else
+         __ret = __wmask_type();
       }
     return __ret;
   };
@@ -133,7 +138,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   do_is(mask __m, char_type __c) const
   { 
     bool __ret = false;
-    // Generically, 15 (instead of 10) since we don't know the numerical
+    // Generically, 15 (instead of 11) since we don't know the numerical
     // encoding of the various categories in /usr/include/ctype.h.
     const size_t __bitmasksize = 15; 
     for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
@@ -152,7 +157,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     for (;__lo < __hi; ++__vec, ++__lo)
       {
-       // Generically, 15 (instead of 10) since we don't know the numerical
+       // Generically, 15 (instead of 11) since we don't know the numerical
        // encoding of the various categories in /usr/include/ctype.h.
        const size_t __bitmasksize = 15; 
        mask __m = 0;
index 043a53a8abb544a9c7c1f1c659971068c6b60f87..cd9604c73385bb7a601ed91fd3d5bb0e441f8505 100644 (file)
@@ -94,6 +94,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       case graph:
        __ret = __wctype_l("graph", _M_c_locale_ctype);
        break;
+      case blank:
+       __ret = __wctype_l("blank", _M_c_locale_ctype);
+       break;
       default:
        __ret = __wmask_type();
       }
@@ -144,8 +147,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
     else
       {
-       // Highest bitmask in ctype_base == 10, but extra in "C"
-       // library for blank.
+       // Highest bitmask in ctype_base == 11
        const size_t __bitmasksize = 11;
        for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
          if (__m & _M_bit[__bitcur])
@@ -168,8 +170,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     for (; __lo < __hi; ++__vec, ++__lo)
       {
-       // Highest bitmask in ctype_base == 10, but extra in "C"
-       // library for blank.
+       // Highest bitmask in ctype_base == 11
        const size_t __bitmasksize = 11; 
        mask __m = 0;
        for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
index 012375f60004bb7e8ba2c43cda949f79e952490d..de78205750ee7774f46b9cd0fc9812651e5227bb 100644 (file)
@@ -52,6 +52,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _ISCNTRL;
     static const mask punct    = _ISPUNCT;
     static const mask alnum    = _ISALPHA | _ISDIGIT;
+#if __cplusplus >= 201103L
+    static const mask blank    = _ISBLANK;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 597509bef2a60345c39f90a1c5574f4a1cead62b..1b441a67995a883362571d1aca5edd11b887eb44 100644 (file)
@@ -26,9 +26,7 @@
 // ISO C++ 14882: 22.1  Locales
 //
 
-// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
-
-// Support for Solaris 2.5.1
+// Information as gleaned from /usr/include/ctype.h
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
@@ -54,6 +52,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _C;
     static const mask punct    = _P;
     static const mask alnum    = _U | _L | _N;
+#if __cplusplus >= 201103L
+    static const mask blank    = space;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index edf23e1c4770b44b27903cabc98ec3e0cfe0fa47..b77ac70517ace1947f439120785ead615eadab4d 100644 (file)
@@ -54,6 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _CTYPE_C;
     static const mask punct    = _CTYPE_P;
     static const mask alnum    = _CTYPE_A | _CTYPE_D;
+    static const mask blank    = _CTYPE_B;
 #else
     // Older versions, including Free BSD 3.4, use this style of define.
     static const mask upper            = _U;
@@ -67,6 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _C;
     static const mask punct    = _P;
     static const mask alnum    = _A | _D;
+    static const mask blank    = _B;
 #endif
   };
 
index 1170e4eacd4d358f66e3209d11b81c64ae88371e..5ae578994efd0fc033c5f7892ffe07a7e283842c 100644 (file)
@@ -60,7 +60,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        {
 #if defined (_CTYPE_S) || defined (__istype)
          *__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit
-                              | space | print | graph | cntrl | punct | alnum);
+                              | space | print | graph | cntrl | punct | alnum
+                              | blank);
 #else
          mask __m = 0;
          if (this->is(upper, *__low)) __m |= upper;
@@ -75,6 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          if (this->is(punct, *__low)) __m |= punct;
          // Do not include explicit line for alnum mask since it is a
          // pure composite of masks on FreeBSD.
+         if (this->is(blank, *__low)) __m |= blank;
          *__vec = __m;
 #endif
        }
@@ -123,7 +125,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     for (; __lo < __hi; ++__vec, ++__lo)
       *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit
-                          | space | print | graph | cntrl | punct | alnum);
+                          | space | print | graph | cntrl | punct | alnum
+                          | blank);
     return __hi;
   }
   
index a95b248d0162f602c25371bde40265dcafd9b760..856da8e575565d6a70fbd3d9634206c59b5a9d98 100644 (file)
@@ -52,6 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _CTYPE_C;
     static const mask punct    = _CTYPE_P;
     static const mask alnum    = _CTYPE_A | _CTYPE_D;
+    static const mask blank    = _CTYPE_B;
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 984665ef948496381481ad2ad90e8f4251943d70..8e0f078fb66bfc53c83eb42d292d6ae79f0ca595 100644 (file)
@@ -59,7 +59,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       for (;__low < __high; ++__vec, ++__low)
        {
          *__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit
-                              | space | print | graph | cntrl | punct | alnum);
+                              | space | print | graph | cntrl | punct | alnum
+                              | blank);
        }
     return __high;
   }
@@ -106,7 +107,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     for (; __lo < __hi; ++__vec, ++__lo)
       *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit
-                          | space | print | graph | cntrl | punct | alnum);
+                          | space | print | graph | cntrl | punct | alnum
+                          | blank);
     return __hi;
   }
 
index 9bd2a18dd3cb6be75708d4d57fe62c75541c215b..ba6433ad30dae5b64877f8af79f86aa32592ce94 100644 (file)
@@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _CTYPE_C;
     static const mask punct    = _CTYPE_P;
     static const mask alnum    = _CTYPE_A | _CTYPE_D;
+    static const mask blank    = _CTYPE_B;
 #else
     // Older versions, including Free BSD 3.4, use this style of define.
     static const mask upper            = _U;
@@ -69,6 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _C;
     static const mask punct    = _P;
     static const mask alnum    = _A | _D;
+    static const mask blank    = _B;
 #endif
   };
 
index 939304a0dbb26662459b351c2b497c2dd5331535..01530996e1fb189d835ee99a3671a53a68fdfd53 100644 (file)
@@ -60,7 +60,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        {
 #if defined (_CTYPE_S) || defined (__istype)
          *__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit
-                              | space | print | graph | cntrl | punct | alnum);
+                              | space | print | graph | cntrl | punct | alnum
+                              | blank);
 #else
          mask __m = 0;
          if (this->is(upper, *__low)) __m |= upper;
@@ -75,6 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          if (this->is(punct, *__low)) __m |= punct;
          // Do not include explicit line for alnum mask since it is a
          // pure composite of masks on FreeBSD.
+         if (this->is(blank, *__low)) __m |= blank;
          *__vec = __m;
 #endif
        }
@@ -123,7 +125,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     for (; __lo < __hi; ++__vec, ++__lo)
       *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit
-                          | space | print | graph | cntrl | punct | alnum);
+                          | space | print | graph | cntrl | punct | alnum
+                          | blank);
     return __hi;
   }
 
index f441d749c1f30138450c2f0b7e7f1d068f6b8b05..6cd339f443f32748da1b61155ad861522047f03f 100644 (file)
@@ -69,6 +69,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _CTYPE_C;
     static const mask punct    = _CTYPE_P;
     static const mask alnum    = _CTYPE_U | _CTYPE_L | _CTYPE_N;
+#endif
+#if __cplusplus >= 201103L
+    static const mask blank    = space;
 #endif
   };
 
index 3599c95f317db9aed7a49ae0e3e53a2cf97fae6e..ad9799aaeb18c89ebc14da72838012ca4c5e904e 100644 (file)
@@ -53,6 +53,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _C;
     static const mask punct    = _P;
     static const mask alnum    = _U | _L | _N;
+#if __cplusplus >= 201103L
+    static const mask blank    = space;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index b4befe1600bbd18bcaff76d8f6b4c226cdfcf473..1be9767ed877ee28bb7d1d61fd194a7b0eed8f61 100644 (file)
@@ -51,6 +51,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask xdigit = __dj_ISXDIGIT;   // Hexadecimal numeric
     static const mask alnum = __dj_ISALPHA | __dj_ISDIGIT;  // Alphanumeric
     static const mask graph = __dj_ISALPHA | __dj_ISDIGIT | __dj_ISPUNCT;  // Graphical
+#if __cplusplus >= 201103L
+    static const mask blank    = __dj_ISBLANK;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 8a8606b8f48d75688e31021c9c60b4e023e0c929..c70c03f1ff55a7c44dd6bb8b9609e865afa74ef7 100644 (file)
@@ -52,6 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = 1 << 8;
     static const mask punct    = 1 << 9;
     static const mask alnum    = (1 << 2) | (1 << 3);  // alpha|digit
+    static const mask blank    = 1 << 10;
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index d150f31ad6551760a4d43c81a9793236cfedb92e..31c8c57a3e62ddfebf4b4aeac5a71ab24c4bf2e9 100644 (file)
@@ -97,6 +97,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                  case graph:
                    __testis = isgraph(__c);
                    break;
+#ifdef _GLIBCXX_USE_C99_CTYPE_TR1
+                 case blank:
+                   __testis = isblank(__c);
+                   break;
+#endif
                  default:
                    __testis = false;
                    break;
@@ -117,7 +122,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
     else
       {
-       // Highest bitmask in ctype_base == 10.
+       // Highest bitmask in ctype_base == 11.
        const size_t __bitmasksize = 15; 
        for (;__low < __high; ++__vec, ++__low)
          {
index 8cd1d464fa2086dd918dc7bf4c28089ff28a0190..e28ed945e6a3137a82ffebb8adbbe76c7979d657 100644 (file)
@@ -57,6 +57,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _IScntrl;
     static const mask punct    = _ISpunct;
     static const mask alnum    = _ISalpha | _ISdigit;
+#if __cplusplus >= 201103L
+    static const mask blank    = _ISblank;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index f8b0f7c6cf3d44abe6498c2218d4ed48316512b9..b093ffbcc3e299fbdf74a55f5e60dfa9c06c9d15 100644 (file)
@@ -52,6 +52,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl     = _ISCNTRL;
     static const mask punct     = _ISPUNCT;
     static const mask alnum     = _ISALPHA | _ISDIGIT;
+#if __cplusplus >= 201103L
+    static const mask blank    = _ISBLANK;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 7803422fb52658c02dad53b0f0793421af51f965..0780091196ccb074100eaee3c4ab627a74bb5ee1 100644 (file)
@@ -58,6 +58,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = 1 << 8;
     static const mask punct    = 1 << 9;
     static const mask alnum    = (1 << 2) | (1 << 3);  // alpha|digit
+#if __cplusplus >= 201103L
+    static const mask blank    = 1 << 10;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 19456e0dd0d9044292206b3f8bf6b56336677ac6..b1b4fa07a5eece0277249b092fccbaebddee2e1a 100644 (file)
@@ -54,7 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       cntrl /* ^F */,
       cntrl /* ^G */,
       cntrl /* ^H */,
-      ctype_base::mask(space | cntrl) /* tab */,
+      ctype_base::mask(space | cntrl | blank) /* tab */,
       ctype_base::mask(space | cntrl) /* LF */,
       ctype_base::mask(space | cntrl) /* ^K */,
       ctype_base::mask(space | cntrl) /* FF */,
@@ -77,7 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       cntrl /* ^] */,
       cntrl /* ^^ */,
       cntrl /* ^_ */,
-      ctype_base::mask(space | print) /*   */,
+      ctype_base::mask(space | print | blank) /*   */,
       ctype_base::mask(punct | print) /* ! */,
       ctype_base::mask(punct | print) /* " */,
       ctype_base::mask(punct | print) /* # */,
index 7803422fb52658c02dad53b0f0793421af51f965..0780091196ccb074100eaee3c4ab627a74bb5ee1 100644 (file)
@@ -58,6 +58,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = 1 << 8;
     static const mask punct    = 1 << 9;
     static const mask alnum    = (1 << 2) | (1 << 3);  // alpha|digit
+#if __cplusplus >= 201103L
+    static const mask blank    = 1 << 10;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 19456e0dd0d9044292206b3f8bf6b56336677ac6..b1b4fa07a5eece0277249b092fccbaebddee2e1a 100644 (file)
@@ -54,7 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       cntrl /* ^F */,
       cntrl /* ^G */,
       cntrl /* ^H */,
-      ctype_base::mask(space | cntrl) /* tab */,
+      ctype_base::mask(space | cntrl | blank) /* tab */,
       ctype_base::mask(space | cntrl) /* LF */,
       ctype_base::mask(space | cntrl) /* ^K */,
       ctype_base::mask(space | cntrl) /* FF */,
@@ -77,7 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       cntrl /* ^] */,
       cntrl /* ^^ */,
       cntrl /* ^_ */,
-      ctype_base::mask(space | print) /*   */,
+      ctype_base::mask(space | print | blank) /*   */,
       ctype_base::mask(punct | print) /* ! */,
       ctype_base::mask(punct | print) /* " */,
       ctype_base::mask(punct | print) /* # */,
index 29f527d8bf0cbe6c99d66bb603779a61e72c9f2e..1bf5beba0f1554a9959fe052bb51cc448beb90d7 100644 (file)
 // ISO C++ 14882: 22.1  Locales
 //
   
-// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
+// Information as gleaned from /usr/include/ctype.h
 
-// Support for Solaris 2.5.1
-  
 namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -54,6 +52,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _C;
     static const mask punct    = _P;
     static const mask alnum    = _U | _L | _N;
+#if __cplusplus >= 201103L
+    static const mask blank    = space;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index bf7c7566cb29c28a7146fa378c108b0668827bea..c5e11826b2cebdc48191fd4805aa70c3c6b874dc 100644 (file)
@@ -57,6 +57,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _BB;
     static const mask punct    = _PU;
     static const mask alnum    = _DI | _LO | _UP | _XA;
+#if __cplusplus >= 201103L
+    static const mask blank    = _SP | _XB;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index c584feea48d66eb789cc24d65dc76d0ae945cd2f..893b7320c55e327b2ee370e968ed62735c3d5ae1 100644 (file)
@@ -54,6 +54,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _ISCNTRL;
     static const mask punct    = _ISPUNCT;
     static const mask alnum    = _ISALPHA | _ISDIGIT;
+#if __cplusplus >= 201103L
+    static const mask blank    = _ISBLANK;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index d3b2a25d5c589480a2e3045843e11114b5256f73..2089358de1751477574f4c3725991a4b6b10dad1 100644 (file)
@@ -52,6 +52,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _IScntrl;
     static const mask punct    = _ISpunct;
     static const mask alnum    = _ISalpha | _ISdigit;
+#if __cplusplus >= 201103L
+    static const mask blank    = _ISblank;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 39453afecb70fb288d25ed3fccb7dd4508bb130a..86a600750b39b16a5e46ea712cfd41c069285a72 100644 (file)
@@ -59,6 +59,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _IScntrl;
     static const mask punct    = _ISpunct;
     static const mask alnum    = _ISalpha | _ISdigit;
+#if __cplusplus >= 201103L
+    static const mask blank    = _ISblank;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index bc105a2c53e662733adb7ed552dab9665667dcb5..4f92412d0c17114aadf7b600cffec1dd4cebbf92 100644 (file)
@@ -53,6 +53,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     static const mask cntrl    = _C_CONTROL;
     static const mask punct    = _C_PUNCT;
     static const mask alnum    = _C_UPPER | _C_LOWER | _C_NUMBER;
+#if __cplusplus >= 201103L
+    static const mask blank    = _C_WHITE_SPACE;
+#endif
   };
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 453bbedbd62c3b9e1b6ea0ef2a0a0ab7784de1a3..234693bd416f6aedcb5b4ec80f6510aab921a7c3 100644 (file)
@@ -2590,6 +2590,14 @@ _GLIBCXX_END_NAMESPACE_LDBL
     isgraph(_CharT __c, const locale& __loc)
     { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
 
+#if __cplusplus >= 201103L
+  /// Convenience interface to ctype.is(ctype_base::blank, __c).
+  template<typename _CharT>
+    inline bool
+    isblank(_CharT __c, const locale& __loc)
+    { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); }
+#endif
+
   /// Convenience interface to ctype.toupper(__c).
   template<typename _CharT>
     inline _CharT
index f9983c9b5deb9e7c100129bac1900f61ca20194f..3025c2261101eb9d03bec07ef57371e7679bcde0 100644 (file)
@@ -107,6 +107,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     bool
     isgraph(_CharT, const locale&);
 
+#if __cplusplus >= 201103L
+  template<typename _CharT>
+    bool
+    isblank(_CharT, const locale&);
+#endif
+
   template<typename _CharT>
     _CharT
     toupper(_CharT, const locale&);
index 39425d41c227d2bc718615e0842134be8bac9934..c8507cec8dfe89d61cbb8550c2f496864bd45cd5 100644 (file)
@@ -27,9 +27,22 @@ noinst_LTLIBRARIES = libc++11convenience.la
 
 headers =
 
+# Source files linked in via configuration/make substitution for a
+# particular host.
+host_sources = \
+       ctype_configure_char.cc \
+       ctype_members.cc
+
+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
+
 sources = \
        chrono.cc \
        condition_variable.cc \
+       ctype.cc \
        debug.cc \
        functexcept.cc \
        functional.cc \
@@ -45,7 +58,8 @@ sources = \
        shared_ptr.cc \
        snprintf_lite.cc \
        system_error.cc \
-       thread.cc
+       thread.cc \
+       ${host_sources}
 
 if ENABLE_EXTERN_TEMPLATE
 # XTEMPLATE_FLAGS = -fno-implicit-templates
index 70c6c4b61fdcc133a23c7b67580db6cad24c5b63..fd3e7801d85845383aa04dab3b991513e6ba8c8e 100644 (file)
@@ -67,18 +67,19 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libc__11convenience_la_LIBADD =
-am__objects_1 = chrono.lo condition_variable.lo debug.lo \
+am__objects_1 = ctype_configure_char.lo ctype_members.lo
+am__objects_2 = chrono.lo condition_variable.lo ctype.lo debug.lo \
        functexcept.lo functional.lo future.lo hash_c++0x.lo \
        hashtable_c++0x.lo ios.lo limits.lo mutex.lo placeholders.lo \
        random.lo regex.lo shared_ptr.lo snprintf_lite.lo \
-       system_error.lo thread.lo
-@ENABLE_EXTERN_TEMPLATE_TRUE@am__objects_2 = ext11-inst.lo \
+       system_error.lo thread.lo $(am__objects_1)
+@ENABLE_EXTERN_TEMPLATE_TRUE@am__objects_3 = ext11-inst.lo \
 @ENABLE_EXTERN_TEMPLATE_TRUE@  fstream-inst.lo ios-inst.lo \
 @ENABLE_EXTERN_TEMPLATE_TRUE@  iostream-inst.lo istream-inst.lo \
 @ENABLE_EXTERN_TEMPLATE_TRUE@  ostream-inst.lo sstream-inst.lo \
 @ENABLE_EXTERN_TEMPLATE_TRUE@  streambuf-inst.lo string-inst.lo \
 @ENABLE_EXTERN_TEMPLATE_TRUE@  wstring-inst.lo
-am_libc__11convenience_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+am_libc__11convenience_la_OBJECTS = $(am__objects_2) $(am__objects_3)
 libc__11convenience_la_OBJECTS = $(am_libc__11convenience_la_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp =
@@ -314,9 +315,17 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
 # Convenience library for C++11 runtime.
 noinst_LTLIBRARIES = libc++11convenience.la
 headers = 
+
+# Source files linked in via configuration/make substitution for a
+# particular host.
+host_sources = \
+       ctype_configure_char.cc \
+       ctype_members.cc
+
 sources = \
        chrono.cc \
        condition_variable.cc \
+       ctype.cc \
        debug.cc \
        functexcept.cc \
        functional.cc \
@@ -332,7 +341,8 @@ sources = \
        shared_ptr.cc \
        snprintf_lite.cc \
        system_error.cc \
-       thread.cc
+       thread.cc \
+       ${host_sources}
 
 # XTEMPLATE_FLAGS =
 @ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = 
@@ -646,6 +656,12 @@ uninstall-am:
        pdf pdf-am ps ps-am tags uninstall uninstall-am
 
 
+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
+
 vpath % $(top_srcdir)/src/c++11
 
 # Use special rules for the hashtable.cc file so that all
diff --git a/libstdc++-v3/src/c++11/ctype.cc b/libstdc++-v3/src/c++11/ctype.cc
new file mode 100644 (file)
index 0000000..b76962a
--- /dev/null
@@ -0,0 +1,133 @@
+// 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;
+  const ctype_base::mask ctype_base::blank;
+
+  // 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
index 6da69f8ef2e30009b32ea8c1e0ec8e122b19bfac..9afe904cd2ba46a9c0c6172464a3619cb74f9570 100644 (file)
@@ -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 \
index 38f96ccc943bfc0612aa16679eec5176894ce822..9d937927ed74c3b1764f481f24d16c417de214e9 100644 (file)
@@ -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 (file)
index ffeeafc..0000000
+++ /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
diff --git a/libstdc++-v3/testsuite/22_locale/classification/isblank.cc b/libstdc++-v3/testsuite/22_locale/classification/isblank.cc
new file mode 100644 (file)
index 0000000..0c7adc2
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 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.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options " -std=gnu++11 " }
+
+// 22.3.3.1 Character classification [classification]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+typedef char char_type;
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+  VERIFY( std::isblank(' ', std::locale::classic()) );
+  VERIFY( std::isblank('\t', std::locale::classic()) );
+}
+
+void
+test02()
+{
+#ifdef _GLIBCXX_USE_WCHAR_T
+  bool test __attribute__((unused)) = true;
+  VERIFY( std::isblank(L' ', std::locale::classic()) );
+  VERIFY( std::isblank(L'\t', std::locale::classic()) );
+#endif
+}
+
+int main()
+{
+  test01();
+  test02();
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_base/blank.cc b/libstdc++-v3/testsuite/22_locale/ctype_base/blank.cc
new file mode 100644 (file)
index 0000000..cfd02a4
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright (C) 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.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <locale>
+
+void
+test01()
+{
+  const std::ctype_base::mask* blank __attribute__((unused));
+  blank = &std::ctype_base::blank;
+}