diff options
author | kan <kan@FreeBSD.org> | 2002-09-17 04:04:04 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2002-09-17 04:04:04 +0000 |
commit | d28dfe2607c93215301923596ce65ae6df3d4cd9 (patch) | |
tree | e1352a09cb44f9237c705b49ba032895f99b4cba /contrib/libstdc++/include | |
parent | 366976642281939a5ef910427ef046ec6f72af8a (diff) | |
download | FreeBSD-src-d28dfe2607c93215301923596ce65ae6df3d4cd9.zip FreeBSD-src-d28dfe2607c93215301923596ce65ae6df3d4cd9.tar.gz |
Gcc 3.2.1-prerelease C++ support bits from the FSF anoncvs repo gcc-3_2-branch on 16-Sep-2002 13:23:11 EDT.
Diffstat (limited to 'contrib/libstdc++/include')
-rw-r--r-- | contrib/libstdc++/include/bits/c++config | 2 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/codecvt.h | 45 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/locale_facets.h | 7 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/locale_facets.tcc | 33 |
4 files changed, 31 insertions, 56 deletions
diff --git a/contrib/libstdc++/include/bits/c++config b/contrib/libstdc++/include/bits/c++config index 831d35e..b440c68 100644 --- a/contrib/libstdc++/include/bits/c++config +++ b/contrib/libstdc++/include/bits/c++config @@ -34,7 +34,7 @@ #include <bits/os_defines.h> // The current version of the C++ library in compressed ISO date format. -#define __GLIBCPP__ 20020831 +#define __GLIBCPP__ 20020916 // This is necessary until GCC supports separate template // compilation. diff --git a/contrib/libstdc++/include/bits/codecvt.h b/contrib/libstdc++/include/bits/codecvt.h index 506752f..423679a 100644 --- a/contrib/libstdc++/include/bits/codecvt.h +++ b/contrib/libstdc++/include/bits/codecvt.h @@ -1,6 +1,6 @@ // Locale support (codecvt) -*- C++ -*- -// Copyright (C) 2000, 2001 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -66,10 +66,10 @@ { public: // Types: - typedef codecvt_base::result result; - typedef _InternT intern_type; - typedef _ExternT extern_type; - typedef _StateT state_type; + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; // 22.2.1.5.1 codecvt members result @@ -159,17 +159,17 @@ { public: // Types: - typedef codecvt_base::result result; - typedef _InternT intern_type; - typedef _ExternT extern_type; - typedef _StateT state_type; + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; - // Data Members: - static locale::id id; + public: + static locale::id id; explicit codecvt(size_t __refs = 0) - : __codecvt_abstract_base<_InternT,_ExternT,_StateT> (__refs) { } + : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } protected: virtual @@ -215,11 +215,11 @@ { public: // Types: - typedef char intern_type; - typedef char extern_type; - typedef mbstate_t state_type; + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; - // Data Members: + public: static locale::id id; explicit @@ -267,12 +267,12 @@ { public: // Types: - typedef wchar_t intern_type; - typedef char extern_type; - typedef mbstate_t state_type; + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; - // Data Members: - static locale::id id; + public: + static locale::id id; explicit codecvt(size_t __refs = 0); @@ -320,8 +320,9 @@ { public: explicit - codecvt_byname(const char*, size_t __refs = 0) + codecvt_byname(const char* __s, size_t __refs = 0) : codecvt<_InternT, _ExternT, _StateT>(__refs) { } + protected: virtual ~codecvt_byname() { } diff --git a/contrib/libstdc++/include/bits/locale_facets.h b/contrib/libstdc++/include/bits/locale_facets.h index 159cecc..f99562f 100644 --- a/contrib/libstdc++/include/bits/locale_facets.h +++ b/contrib/libstdc++/include/bits/locale_facets.h @@ -847,7 +847,6 @@ namespace std : locale::facet(__refs) { _M_c_locale_collate = _S_c_locale; } - // Non-standard. explicit collate(__c_locale __cloc, size_t __refs = 0) : locale::facet(__refs) @@ -1739,6 +1738,12 @@ namespace std string messages<char>::do_get(catalog, int, int, const string&) const; +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + wstring + messages<wchar_t>::do_get(catalog, int, int, const wstring&) const; +#endif + // Include host and configuration specific messages virtual functions. #include <bits/messages_members.h> diff --git a/contrib/libstdc++/include/bits/locale_facets.tcc b/contrib/libstdc++/include/bits/locale_facets.tcc index 63e52c0..195d33a 100644 --- a/contrib/libstdc++/include/bits/locale_facets.tcc +++ b/contrib/libstdc++/include/bits/locale_facets.tcc @@ -1969,41 +1969,10 @@ namespace std // Convert numeric value of type _Tv to string and return length of string. // If snprintf is available use it, otherwise fall back to the unsafe sprintf // which, in general, can be dangerous and should be avoided. -#ifdef _GLIBCPP_USE_C99 template<typename _Tv> int __convert_from_v(char* __out, const int __size, const char* __fmt, - _Tv __v, const __c_locale&, int __prec = -1) - { - int __ret; - char* __old = strdup(setlocale(LC_ALL, NULL)); - setlocale(LC_ALL, "C"); - if (__prec >= 0) - __ret = snprintf(__out, __size, __fmt, __prec, __v); - else - __ret = snprintf(__out, __size, __fmt, __v); - setlocale(LC_ALL, __old); - free(__old); - return __ret; - } -#else - template<typename _Tv> - int - __convert_from_v(char* __out, const int, const char* __fmt, _Tv __v, - const __c_locale&, int __prec = -1) - { - int __ret; - char* __old = strdup(setlocale(LC_ALL, NULL)); - setlocale(LC_ALL, "C"); - if (__prec >= 0) - __ret = sprintf(__out, __fmt, __prec, __v); - else - __ret = sprintf(__out, __fmt, __v); - setlocale(LC_ALL, __old); - free(__old); - return __ret; - } -#endif + _Tv __v, const __c_locale&, int __prec = -1); // Construct correctly padded string, as per 22.2.2.2.2 // Assumes |