summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/include/c_std/std_cwchar.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/include/c_std/std_cwchar.h')
-rw-r--r--contrib/libstdc++/include/c_std/std_cwchar.h55
1 files changed, 31 insertions, 24 deletions
diff --git a/contrib/libstdc++/include/c_std/std_cwchar.h b/contrib/libstdc++/include/c_std/std_cwchar.h
index d9e11e9..20cb804 100644
--- a/contrib/libstdc++/include/c_std/std_cwchar.h
+++ b/contrib/libstdc++/include/c_std/std_cwchar.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
@@ -28,19 +28,20 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-//
-// ISO C++ 14882: 21.4
-//
-
-/** @file cwchar
+/** @file include/cwchar
* This is a Standard C++ Library file. You should @c #include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c wchar.h,
* and its contents are (mostly) the same as that header, but are all
- * contained in the namespace @c std.
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
*/
+//
+// ISO C++ 14882: 21.4
+//
+
#ifndef _GLIBCXX_CWCHAR
#define _GLIBCXX_CWCHAR 1
@@ -66,10 +67,11 @@ extern "C"
}
#endif
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
using ::mbstate_t;
-}
+
+_GLIBCXX_END_NAMESPACE
// Get rid of those macros defined in <wchar.h> in lieu of real functions.
#undef btowc
@@ -138,8 +140,9 @@ namespace std
#undef wscanf
#if _GLIBCXX_USE_WCHAR_T
-namespace std
-{
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
using ::wint_t;
using ::btowc;
@@ -211,7 +214,7 @@ namespace std
using ::wcspbrk;
inline wchar_t*
- wcspbrk(wchar_t* __s1, wchar_t* __s2)
+ wcspbrk(wchar_t* __s1, const wchar_t* __s2)
{ return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
using ::wcsrchr;
@@ -231,7 +234,8 @@ namespace std
inline wchar_t*
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
-}
+
+_GLIBCXX_END_NAMESPACE
#if _GLIBCXX_USE_C99
@@ -239,8 +243,8 @@ namespace std
#undef wcstoll
#undef wcstoull
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" long double
(wcstold)(const wchar_t * restrict, wchar_t ** restrict);
@@ -258,14 +262,17 @@ namespace __gnu_cxx
using ::wcstoll;
using ::wcstoull;
#endif
-}
-namespace std
-{
- using __gnu_cxx::wcstold;
- using __gnu_cxx::wcstoll;
- using __gnu_cxx::wcstoull;
-}
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::__gnu_cxx::wcstold;
+ using ::__gnu_cxx::wcstoll;
+ using ::__gnu_cxx::wcstoull;
+
+_GLIBCXX_END_NAMESPACE
+
#endif
#endif //_GLIBCXX_USE_WCHAR_T
OpenPOWER on IntegriCloud