diff options
author | kan <kan@FreeBSD.org> | 2003-11-07 02:44:01 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-07 02:44:01 +0000 |
commit | a342444c67382961a80b87c516fb6b2d85a15ffc (patch) | |
tree | 6e5365a8da80f9003283db9715c2f150cef8eb01 /contrib/libstdc++/include/bits | |
parent | b09448931ae541a7a60fd1cf0ebac14b627fba69 (diff) | |
download | FreeBSD-src-a342444c67382961a80b87c516fb6b2d85a15ffc.zip FreeBSD-src-a342444c67382961a80b87c516fb6b2d85a15ffc.tar.gz |
Gcc 3.3.3 20031106 C++ support bits.
Diffstat (limited to 'contrib/libstdc++/include/bits')
-rw-r--r-- | contrib/libstdc++/include/bits/basic_ios.h | 3 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/c++config | 2 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/istream.tcc | 8 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/locale_facets.tcc | 6 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/stl_algo.h | 6 |
5 files changed, 16 insertions, 9 deletions
diff --git a/contrib/libstdc++/include/bits/basic_ios.h b/contrib/libstdc++/include/bits/basic_ios.h index fe5e36a..70d8e84 100644 --- a/contrib/libstdc++/include/bits/basic_ios.h +++ b/contrib/libstdc++/include/bits/basic_ios.h @@ -242,7 +242,8 @@ namespace std * The parameter is passed by derived streams. */ explicit - basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base() + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_fctype(0), _M_fnumput(0), _M_fnumget(0) { this->init(__sb); } /** diff --git a/contrib/libstdc++/include/bits/c++config b/contrib/libstdc++/include/bits/c++config index 1b4c2d2..9fdb8cc 100644 --- a/contrib/libstdc++/include/bits/c++config +++ b/contrib/libstdc++/include/bits/c++config @@ -35,7 +35,7 @@ #include <bits/os_defines.h> // The current version of the C++ library in compressed ISO date format. -#define __GLIBCPP__ 20030804 +#define __GLIBCPP__ 20031106 // This is necessary until GCC supports separate template compilation. #define _GLIBCPP_NO_TEMPLATE_EXPORT 1 diff --git a/contrib/libstdc++/include/bits/istream.tcc b/contrib/libstdc++/include/bits/istream.tcc index 7ba6735..ae0c507 100644 --- a/contrib/libstdc++/include/bits/istream.tcc +++ b/contrib/libstdc++/include/bits/istream.tcc @@ -757,8 +757,12 @@ namespace std sentry __cerb(*this, true); if (__cerb) { - try - { __c = this->rdbuf()->sgetc(); } + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + this->setstate(ios_base::eofbit); + } catch(...) { // 27.6.1.3 paragraph 1 diff --git a/contrib/libstdc++/include/bits/locale_facets.tcc b/contrib/libstdc++/include/bits/locale_facets.tcc index 9ad4dfe..2563a95 100644 --- a/contrib/libstdc++/include/bits/locale_facets.tcc +++ b/contrib/libstdc++/include/bits/locale_facets.tcc @@ -1099,12 +1099,12 @@ namespace std string_type __str; __beg = this->do_get(__beg, __end, __intl, __io, __err, __str); - const int __n = numeric_limits<long double>::digits10; - char* __cs = static_cast<char*>(__builtin_alloca(__n)); + const int __cs_size = __str.size() + 1; + char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); const locale __loc = __io.getloc(); const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); const _CharT* __wcs = __str.c_str(); - __ctype.narrow(__wcs, __wcs + __str.size() + 1, char(), __cs); + __ctype.narrow(__wcs, __wcs + __cs_size, char(), __cs); __convert_to_v(__cs, __units, __err, _S_c_locale); return __beg; } diff --git a/contrib/libstdc++/include/bits/stl_algo.h b/contrib/libstdc++/include/bits/stl_algo.h index 009c409..3d22697 100644 --- a/contrib/libstdc++/include/bits/stl_algo.h +++ b/contrib/libstdc++/include/bits/stl_algo.h @@ -609,7 +609,8 @@ namespace std else { __first = find(__first, __last, __val); while (__first != __last) { - _Integer __n = __count - 1; + typename iterator_traits<_ForwardIter>::difference_type __n = __count; + --__n; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && *__i == __val) { @@ -661,7 +662,8 @@ namespace std ++__first; } while (__first != __last) { - _Integer __n = __count - 1; + typename iterator_traits<_ForwardIter>::difference_type __n = __count; + --__n; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { |