Author: faridz
Date: Fri Mar 14 08:16:33 2008
New Revision: 637130
URL: http://svn.apache.org/viewvc?rev=637130&view=rev
Log:
2008-03-14 Farid Zaripov <[EMAIL PROTECTED]>
Merge changes from trunk.
2008-02-08 Farid Zaripov <[EMAIL PROTECTED]>
STDCXX-375
* include/istream (std::getline, std::operator>>): Declaration moved
from here ...
* include/string (std::getline, std::operator>>): ... to here.
* include/istream.cc (std::getline, std::operator>>): Added comment
about
declarations in <string>
2008-02-12 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-308
* include/fstream (~basic_filebuf): Caught and swallowed all exceptions.
* include/fstream.cc (close): Closed file regardless of whether the call
to overflow() or codecvt::unshift() fails or throws, as required by the
resolution of LWG issue 622.
2008-02-13 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-695
* include/loc/_money_get.cc (_C_get): Introduced a convenience typedef
for size_t, changed the type of the local __sign to int and cast it to
size_t to silence the pesky HP aCC 6 remark #4271-D: type conversion
may lose sign.
* include/loc/_messages.cc (do_get): Same.
* include/sstream (str): Avoided pointer math to silence remark #4271.
2008-02-14 Farid Zaripov <[EMAIL PROTECTED]>
* include/rw/_defs.h: Move MSVC specific #pragma's from here...
* include/rw/_config-msvc.h: ... to here. Disable warning C4661.
2008-02-14 Farid Zaripov <[EMAIL PROTECTED]>
* include/rw/_defs.h: #define new macro _RWSTD_TI_EXPORT
to prevent MSVC warning C4910: "'__declspec(dllexport)'
and 'extern' are incompatible on an explicit instantiation".
* include/fstream: Use _RWSTD_TI_EXPORT instead of
_RWSTD_EXPORT on an explicit instantiations.
* include/istream: Ditto.
* include/loc/_messages.h: Ditto.
* include/loc/_money_get.h: Ditto.
* include/loc/_money_put.h: Ditto.
* include/loc/_moneypunct.h: Ditto.
* include/loc/_num_get.h: Ditto.
* include/loc/_num_put.h: Ditto.
* include/loc/_numpunct.h: Ditto.
* include/loc/_punct.h: Ditto.
* include/loc/_time_get.h: Ditto.
* include/loc/_time_put.h: Ditto.
* include/ostream: Ditto.
* include/rw/_basic_ios.h: Ditto.
* include/rw/_ioinsert.h: Ditto.
* include/rw/_mutex.h: Ditto.
* include/sstream: Ditto.
* include/streambuf: Ditto.
* include/string: Ditto.
2008-02-22 Farid Zaripov <[EMAIL PROTECTED]>
STDCXX-375
* include/string: Declarations of the string inserter's and extractor's
are moved to #included <rw/_stringio.h>.
* include/ostream: Definition of the inline string inserter moved to
#included <rw/_stringio.h>.
* include/istream: Definition of the inline std::getline() moved to
#included <rw/_stringio.h>.
* include/istream.cc: Definitions of the string extractor's are moved
to rw/_stringio.cc file.
* include/rw/_stringio.h: New header file with declarations of the
string inserter's and extractor's.
* include/rw/_stringio.cc: New file with definitions of the string
extractors.
* include/rw/_stringio.c: New file for compilers with implicit
inclusion feature.
* src/export/cpp: #included <rw/_stringio.h> and <rw/_stringio.cc>.
Added:
stdcxx/branches/4.2.x/include/rw/_stringio.c
- copied unchanged from r635445, stdcxx/trunk/include/rw/_stringio.c
stdcxx/branches/4.2.x/include/rw/_stringio.cc
- copied unchanged from r635445, stdcxx/trunk/include/rw/_stringio.cc
stdcxx/branches/4.2.x/include/rw/_stringio.h
- copied unchanged from r635445, stdcxx/trunk/include/rw/_stringio.h
Modified:
stdcxx/branches/4.2.x/include/fstream
stdcxx/branches/4.2.x/include/fstream.cc
stdcxx/branches/4.2.x/include/istream
stdcxx/branches/4.2.x/include/istream.cc
stdcxx/branches/4.2.x/include/loc/_messages.cc
stdcxx/branches/4.2.x/include/loc/_messages.h
stdcxx/branches/4.2.x/include/loc/_money_get.cc
stdcxx/branches/4.2.x/include/loc/_money_get.h
stdcxx/branches/4.2.x/include/loc/_money_put.h
stdcxx/branches/4.2.x/include/loc/_moneypunct.h
stdcxx/branches/4.2.x/include/loc/_num_get.h
stdcxx/branches/4.2.x/include/loc/_num_put.h
stdcxx/branches/4.2.x/include/loc/_numpunct.h
stdcxx/branches/4.2.x/include/loc/_punct.h
stdcxx/branches/4.2.x/include/loc/_time_get.h
stdcxx/branches/4.2.x/include/loc/_time_put.h
stdcxx/branches/4.2.x/include/ostream
stdcxx/branches/4.2.x/include/rw/_basic_ios.h
stdcxx/branches/4.2.x/include/rw/_config-msvc.h
stdcxx/branches/4.2.x/include/rw/_defs.h
stdcxx/branches/4.2.x/include/rw/_ioinsert.h
stdcxx/branches/4.2.x/include/rw/_mutex.h
stdcxx/branches/4.2.x/include/sstream
stdcxx/branches/4.2.x/include/streambuf
stdcxx/branches/4.2.x/include/string
stdcxx/branches/4.2.x/src/export.cpp
Modified: stdcxx/branches/4.2.x/include/fstream
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/fstream?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/fstream (original)
+++ stdcxx/branches/4.2.x/include/fstream Fri Mar 14 08:16:33 2008
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -109,7 +109,9 @@
_C_cur_pos (pos_type (off_type (-1))),
_C_beg_pos (pos_type (off_type (-1))),
_C_pbacksize (0) {
- setbuf (0, _RWSTD_DEFAULT_BUFSIZE);
+ // call the virtual setbuf defined in this class (but
+ // not an override defined in a class derived from it)
+ basic_filebuf::setbuf (0, _RWSTD_DEFAULT_BUFSIZE);
}
#if defined (_RWSTD_NO_EXT_FILEBUF) \
@@ -277,7 +279,12 @@
template<class _CharT, class _Traits>
inline basic_filebuf<_CharT, _Traits>::~basic_filebuf ()
{
- close ();
+ _TRY {
+ close ();
+ }
+ _CATCH (...) {
+ // LWG issue 622: swallow all exceptions
+ }
if (this->_C_own_buf ())
delete [] this->_C_buffer;
@@ -664,7 +671,7 @@
#if _RWSTD_INSTANTIATE (_BASIC_FILEBUF, _CHAR)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_filebuf<char, char_traits<char> >);
#endif // _RWSTD_INSTANTIATE (_BASIC_FILEBUF, _CHAR)
@@ -672,7 +679,7 @@
#if _RWSTD_INSTANTIATE (_BASIC_FILEBUF, _WCHAR_T)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_filebuf<wchar_t, char_traits<wchar_t> >);
#endif // _RWSTD_INSTANTIATE (_BASIC_FILEBUF, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/fstream.cc
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/fstream.cc?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/fstream.cc (original)
+++ stdcxx/branches/4.2.x/include/fstream.cc Fri Mar 14 08:16:33 2008
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1997-2006 Rogue Wave Software, Inc.
+ * Copyright 1997-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -76,27 +76,52 @@
basic_filebuf<_CharT, _Traits>::
close (bool __close_file /* = true */)
{
+ // close_file is false when close() is called from detach()
+
_RWSTD_ASSERT (this->_C_is_valid ());
if (!is_open ())
return 0; // failure
- // avoid expensive call to overflow() unless necessary
- if (this->pptr () != this->pbase () && this->_C_is_eof (overflow ()))
- return 0; // failure
+ // close() returns this on success, 0 on failure
+ basic_filebuf *__retval = this;
- // write out any unshift sequence if necessary
- // (applies to multibyte, state dependent encodings only)
- if (this->_C_out_last () && !_C_unshift ())
- return 0; // failure
+ _TRY {
+ // avoid expensive call to overflow() unless necessary
+ if (this->pptr () != this->pbase () && this->_C_is_eof (overflow ()))
+ __retval = 0; // failure
+
+ // write out any unshift sequence if necessary
+ // (applies to multibyte, state dependent encodings only)
+ if (__retval && this->_C_out_last () && !_C_unshift ())
+ __retval = 0; // failure
+ }
+ _CATCH (...) {
+ // either overflow() or codecvt::unshift() threw
- if (__close_file && _RW::__rw_fclose (_C_file, this->_C_state))
- return 0; // failure
+ if (__close_file) {
+ _RW::__rw_fclose (_C_file, this->_C_state);
- _C_file = 0;
- _C_cur_pos = _C_beg_pos = pos_type (off_type (-1));
+ // zero out the file pointer except when detaching fd
+ _C_file = 0;
+ _C_cur_pos = _C_beg_pos = pos_type (off_type (-1));
- return this;
+ }
+
+ // rethrow the caught exception
+ _RETHROW;
+ }
+
+ if (__close_file) {
+ if (_RW::__rw_fclose (_C_file, this->_C_state))
+ __retval = 0;
+
+ // zero out the file pointer except when detaching fd
+ _C_file = 0;
+ _C_cur_pos = _C_beg_pos = pos_type (off_type (-1));
+ }
+
+ return __retval;
}
Modified: stdcxx/branches/4.2.x/include/istream
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/istream?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/istream (original)
+++ stdcxx/branches/4.2.x/include/istream Fri Mar 14 08:16:33 2008
@@ -522,30 +522,6 @@
}
-_EXPORT
-template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
-operator>> (basic_istream<_CharT, _Traits>&,
- basic_string<_CharT, _Traits, _Allocator>&);
-
-
-_EXPORT
-template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
-getline (basic_istream<_CharT, _Traits>&,
- basic_string<_CharT, _Traits, _Allocator>&,
- _CharT);
-
-
-template<class _CharT, class _Traits, class _Allocator>
-inline basic_istream<_CharT, _Traits>&
-getline (basic_istream<_CharT, _Traits>& __is,
- basic_string<_CharT, _Traits, _Allocator>& __str)
-{
- return getline (__is, __str, __is.widen ('\n'));
-}
-
-
// 27.6.1.5
template<class _CharT, class _Traits /* = char_traits<_CharT> */>
class basic_iostream
@@ -581,27 +557,16 @@
#if _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _CHAR)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_istream<char, char_traits<char> >);
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT istream&
- operator>> (istream&, string&));
-
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT istream&
- getline (istream&, string&, char));
-
#endif // _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _CHAR)
#if _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _WCHAR_T)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_istream<wchar_t, char_traits<wchar_t> >);
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT wistream&
- operator>> (wistream&, wstring&));
-
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT wistream&
- getline (wistream&, wstring&, wchar_t));
#endif // _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _WCHAR_T)
} // namespace std
@@ -610,5 +575,12 @@
#if _RWSTD_DEFINE_TEMPLATE_LAST (_BASIC_ISTREAM)
# include <istream.cc>
#endif // _RWSTD_DEFINE_TEMPLATE_LAST (_BASIC_ISTREAM)
+
+
+#ifndef _RWSTD_STRING_EXTRACTORS_INCLUDED
+# define _RWSTD_INCLUDE_STRING_EXTRACTORS
+# include <rw/_stringio.h>
+#endif // _RWSTD_STRING_EXTRACTORS_INCLUDED
+
#endif // _RWSTD_ISTREAM_INCLUDED
Modified: stdcxx/branches/4.2.x/include/istream.cc
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/istream.cc?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/istream.cc (original)
+++ stdcxx/branches/4.2.x/include/istream.cc Fri Mar 14 08:16:33 2008
@@ -780,372 +780,6 @@
}
-_EXPORT
-template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
-operator>> (basic_istream<_CharT, _Traits>& __is,
- basic_string<_CharT, _Traits, _Allocator>& __str)
-{
- _RWSTD_ASSERT (0 != __is.rdbuf ());
-
- const _TYPENAME basic_istream<_CharT, _Traits>::sentry
- __ipfx (__is /* , noskipws = false */);
-
- ios_base::iostate __err = ios_base::goodbit;
-
- typedef _RWSTD_SIZE_T _SizeT;
-
- // count of characters read from stream
- _SizeT __gcount = 0;
-
- _TRY {
-
- if (__ipfx) {
-
- __str.clear ();
-
- // maximum number of characters we can read
- _RWSTD_SIZE_T __n =
- __is.width () ? __is.width () : __str.max_size ();
-
- basic_streambuf<_CharT, _Traits>* const __rdbuf = __is.rdbuf ();
-
- const ctype<_CharT> &__ctp =
- _USE_FACET (ctype<_CharT>, __is.getloc ());
-
-#ifndef _RWSTD_NO_FRIEND_TEMPLATE
-
- while (__n != 0) {
-
- const _CharT* const __gptr = __rdbuf->gptr ();
- const _CharT* const __egptr = __rdbuf->egptr ();
-
- // maximum number of characters would want to extract
- _SizeT __navail = __egptr - __gptr;
- if (__n < __navail)
- __navail = __n;
-
- if (__navail) {
-
- // find the delimeter in the squence if it exists, or
- // get pointer to end of sequence
- const _CharT* __pdel = __gptr;
- for (/**/; __pdel != __egptr; ++__pdel) {
-
- const _TYPENAME _Traits::int_type
- __c = _Traits::to_int_type(*__pdel);
-
- if (_Traits::eq_int_type (__c, _Traits::eof ())) {
- __err = ios_base::eofbit;
- break;
- }
-
- if (__ctp.is (__ctp.space, *__pdel))
- break;
- }
-
- // __pdel is either pointing to a delimiter or one past
- // the end of the input stream get area. if it is past
- // the end, then set it to null.
- if (__pdel == __egptr) {
- __pdel = 0;
- }
-
- if (__pdel) {
- __navail = __pdel - __gptr + 1;
- __n -= __navail - 1;
- }
- else if (__n == __navail)
- __n -= --__navail;
- else
- __n -= __navail;
-
- // store characters excluding the delimiter
- __str.append (__gptr, __navail - !!__pdel);
-
- __gcount += __navail;
-
- // advance gptr() by the number of extracted
- // characters, including the delimiter
- __rdbuf->gbump (__navail);
-
- // we found a delimiter before the end of the get area,
- // break out of outer loop
- if (__pdel) {
- break;
- }
-
- if (2 > __n && _SizeT (__egptr - __gptr) != __navail) {
- __err = ios_base::failbit;
- break;
- }
- }
- else {
-
- // n data in buffer, trigger underflow()
- // note that streambuf may be unbuffered
- const _TYPENAME _Traits::int_type
- __c = __rdbuf->sgetc ();
-
- if (_Traits::eq_int_type (__c, _Traits::eof ())) {
- __err = ios_base::eofbit;
- break;
- }
-
- // convert to char_type so that isspace works correctly
- const _TYPENAME _Traits::char_type
- __ch = _Traits::to_char_type (__c);
-
- if (__ctp.is (__ctp.space, __ch))
- break;
-
- __str.push_back (__ch);
- --__n;
-
- __rdbuf->sbumpc ();
-
- // increment gcount only _after_ sbumpc() but _before_
- // the subsequent call to sgetc() to correctly reflect
- // the number of extracted characters in the presence
- // of exceptions thrown from streambuf virtuals
- ++__gcount;
- }
- }
-
-#else // if defined (_RWSTD_NO_FRIEND_TEMPLATE)
-
- for ( ; __n != 0; ) {
-
- const _TYPENAME _Traits::int_type
- __c (__rdbuf->sgetc ());
-
- if (_Traits::eq_int_type (__c, _Traits::eof ())) {
- __err = ios_base::eofbit;
- break;
- }
-
- // convert to char_type so that isspace works correctly
- const _TYPENAME _Traits::char_type
- __ch = _Traits::to_char_type (__c);
-
- if (__ctp.is (__ctp.space, __ch))
- break;
-
- __str.push_back (__ch);
- --__n;
-
- __rdbuf->sbumpc ();
-
- // increment gcount only _after_ sbumpc() but _before_
- // the subsequent call to sgetc() to correctly reflect
- // the number of extracted characters in the presence
- // of exceptions thrown from streambuf virtuals
- ++__gcount;
- }
-
-#endif // if defined (_RWSTD_NO_FRIEND_TEMPLATE)
-
- __is.width (0);
- }
- }
- _CATCH (...) {
- __is.setstate (ios_base::badbit | _RW::__rw_rethrow);
- }
-
- if (!__gcount)
- __err |= ios_base::failbit;
-
- if (__err)
- __is.setstate (__err);
-
- return __is;
-}
-
-
-_EXPORT
-template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
-getline (basic_istream<_CharT, _Traits>& __is,
- basic_string<_CharT, _Traits, _Allocator>& __str,
- _CharT __delim)
-{
- _RWSTD_ASSERT (0 != __is.rdbuf ());
-
- const _TYPENAME basic_istream<_CharT, _Traits>::sentry
- __ipfx (__is, true /* noskipws */);
-
-#ifndef _RWSTD_NO_FRIEND_TEMPLATE
-
- ios_base::iostate __err = ios_base::goodbit;
-
- typedef _RWSTD_SIZE_T _SizeT;
-
- _SizeT __gcount = 0;
-
- if (__ipfx) {
-
- __str.clear ();
-
- // carefuly handle arithmetic overflow
- _SizeT __n = __str.max_size ();
- if (__n + _SizeT (1))
- ++__n;
-
- basic_streambuf<_CharT, _Traits>* const __rdbuf = __is.rdbuf ();
-
- _TRY {
-
- for ( ; ; ) {
-
- typedef _TYPENAME _Traits::int_type int_type;
-
- const _CharT* const __gptr = __rdbuf->gptr ();
- const _CharT* const __egptr = __rdbuf->egptr ();
-
- // compute the lesser of the number of characters in the
- // stream buffer and the size of the destination buffer
- _SizeT __navail = __egptr - __gptr;
- if (__n < __navail)
- __navail = __n;
-
- if (__navail) {
-
- // find the delimiter in the sequence if it exists
- const _CharT* const __pdel =
- _Traits::find (__gptr, __navail, __delim);
-
- if (__pdel) {
- __navail = __pdel - __gptr + 1;
- __n -= __navail - 1;
- }
- else if (__n == __navail)
- __n -= --__navail;
- else
- __n -= __navail;
-
- // store characters excluding the delimiter
- __str.append (__gptr, __navail - !!__pdel);
-
- __gcount += __navail;
-
- // advance gptr() by the number of extracted
- // characters, including the delimiter
- __rdbuf->gbump (__navail);
-
- if (__pdel) {
- break;
- }
-
- if (2 > __n && _SizeT (__egptr - __gptr) != __navail) {
- __err = ios_base::failbit;
- break;
- }
- }
- else {
-
- // no data in buffer, trigger underflow()
- // note that streambuf may be unbuffered
- const int_type __c (__rdbuf->sgetc ());
-
- if (_Traits::eq_int_type (__c, _Traits::eof ())) {
- __err = ios_base::eofbit;
- break;
- }
-
- const _CharT __ch = _Traits::to_char_type (__c);
- if (_Traits::eq (__ch, __delim)) {
- __rdbuf->sbumpc ();
- __gcount++;
- break;
- }
-
- if (2 > __n) {
- __err = ios_base::failbit;
- break;
- }
-
- __str += __ch;
- --__n;
-
- __rdbuf->sbumpc ();
-
- // increment gcount only _after_ sbumpc() but _before_
- // the subsequent call to sgetc() to correctly reflect
- // the number of extracted characters in the presence
- // of exceptions thrown from streambuf virtuals
- ++__gcount;
- }
- }
- }
- _CATCH (...) {
- __is.setstate (ios_base::badbit | _RW::__rw_rethrow);
- }
- }
-
- if (!__gcount)
- __err |= ios_base::failbit;
-
-#else // if defined (_RWSTD_NO_FRIEND_TEMPLATE)
-
- ios_base::iostate __err = ios_base::failbit;
-
- if (__ipfx) {
-
- _TRY {
-
- __str.clear ();
-
- const _RWSTD_SIZE_T __max_size = __str.max_size ();
-
- // FIXME: code commented out to work around an HP aCC 3.14.10
- // bug #JAGac86264
-
- // typedef _TYPENAME
- // basic_string<_CharT, _Traits, _Allocator>::size_type
-
- for ( ; ; ) {
-
- const _TYPENAME _Traits::int_type
- __c (__is.rdbuf ()->sgetc ());
-
- if (_Traits::eq_int_type (__c, _Traits::eof ())) {
- // 21.3.7.9, p7
- if (__str.size ())
- __err = ios_base::eofbit;
- else
- __err = ios_base::eofbit | ios_base::failbit;
-
- break;
- }
-
- if (_Traits::eq (_Traits::to_char_type (__c), __delim)) {
- __is.rdbuf ()->sbumpc ();
- __err = ios_base::goodbit;
- break;
- }
-
- if (__max_size <= __str.size ())
- break;
-
- __str.push_back (_Traits::to_char_type (__c));
-
- __is.rdbuf ()->sbumpc ();
- }
- }
- _CATCH (...) {
- __is.setstate (ios_base::badbit | _RW::__rw_rethrow);
- }
- }
-
-#endif // _RWSTD_NO_FRIEND_TEMPLATE
-
- if (__err)
- __is.setstate (__err);
-
- return __is;
-}
-
-
#ifdef _RWSTD_NO_UNDEFINED_TEMPLATES
template <class _CharT, class _Traits>
Modified: stdcxx/branches/4.2.x/include/loc/_messages.cc
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_messages.cc?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_messages.cc (original)
+++ stdcxx/branches/4.2.x/include/loc/_messages.cc Fri Mar 14 08:16:33 2008
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2007 Rogue Wave Software, Inc.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -78,9 +78,10 @@
return _RWSTD_REINTERPRET_CAST (const _CharT*, __text);
}
- typedef char_traits<char> CharTraits;
+ typedef char_traits<char> _CharTraits;
+ typedef _RWSTD_SIZE_T _SizeT;
- const _RWSTD_SIZE_T __src_len = CharTraits::length (__text);
+ const _SizeT __src_len = _CharTraits::length (__text);
const char* const __src_first = __text;
const char* const __src_last = __text + __src_len;
const char* __src_next = __src_first;
@@ -105,7 +106,9 @@
switch (__res) {
case codecvt_base::ok:
// shrink the converted string accordingly
- __result_str.resize (__dst_next - __dst_first);
+ _RWSTD_ASSERT (__dst_first <= __dst_next);
+
+ __result_str.resize (_SizeT (__dst_next - __dst_first));
return __result_str;
case codecvt_base::noconv:
@@ -122,7 +125,7 @@
const _Ctype& __ctp =
_RWSTD_USE_FACET (_Ctype, _RW::__rw_get_locale (__cat));
- for (_RWSTD_SIZE_T __i = 0; __i != __src_len; ++__i)
+ for (_SizeT __i = 0; __i != __src_len; ++__i)
__dst_first [__i] = __ctp.widen (__text [__i]);
return __result_str;
Modified: stdcxx/branches/4.2.x/include/loc/_messages.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_messages.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_messages.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_messages.h Fri Mar 14 08:16:33 2008
@@ -150,13 +150,13 @@
#if _RWSTD_INSTANTIATE (_MESSAGES, _CHAR)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT messages<char>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT messages<char>);
#endif // _RWSTD_INSTANTIATE (_MESSAGES, _CHAR)
#if _RWSTD_INSTANTIATE (_MESSAGES, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT messages<wchar_t>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT messages<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_MESSAGES, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_money_get.cc
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_money_get.cc?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_money_get.cc (original)
+++ stdcxx/branches/4.2.x/include/loc/_money_get.cc Fri Mar 14 08:16:33 2008
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -94,7 +94,7 @@
const char *__grpend = 0; // the end of the last group
- long __sign = 0; // the sign of the result if detected
+ int __sign = 0; // the sign of the result if detected (-1, 0, or +1)
// buffer must always start with a sign (__rw_get_num requirement)
// use a '+' and overwrite it with a '-' if necessary
@@ -102,7 +102,9 @@
const int __fl = __flags.flags ();
- for (_RWSTD_SIZE_T __i = 0; !__ebits && __i != sizeof __pat.field; ++__i) {
+ typedef _RWSTD_SIZE_T _SizeT;
+
+ for (_SizeT __i = 0; !__ebits && __i != sizeof __pat.field; ++__i) {
switch (__pat.field [__i]) {
@@ -124,7 +126,7 @@
&& (0 == __cs.size () || !(__fl & _RW::__rw_showbase)))
break;
- _RWSTD_SIZE_T __nc = 0;
+ _SizeT __nc = 0;
while (__it != __end && __ctp.is (ctype_base::space, *__it)) {
++__it;
@@ -148,7 +150,7 @@
|| __sign < 0 && __ns.size () > 1
|| __sign > 0 && __ps.size () > 1) {
- for (_RWSTD_SIZE_T __nc = 0; __nc != __cs.size ();
+ for (_SizeT __nc = 0; __nc != __cs.size ();
++__nc, ++__it) {
if (__it == __end || !_Traits::eq (*__it, __cs [__nc])) {
@@ -259,7 +261,7 @@
if (__buf [1]) {
// process the remainder of a multicharacter sign
- const _RWSTD_SIZE_T __sizes [] = {
+ const _SizeT __sizes [] = {
__ps.size () ? __ps.size () -1 : 0,
__ns.size () ? __ns.size () -1 : 0
};
@@ -274,7 +276,7 @@
// if the first character of a multi-character sign
// has been seen, try to extract the rest of the sign
- _RWSTD_SIZE_T __inx = 0;
+ _SizeT __inx = 0;
int __errtmp = 1; // no duplicates allowed
@@ -304,7 +306,7 @@
// if both signs begin with the same character,
// the result is positive (22.2.6.1.2, p3)
*__buf = __inx ? '-' : '+';
- __sign = -long (__inx);
+ __sign = -int (__inx);
}
}
else if (__sign < 0) {
@@ -316,20 +318,21 @@
const char *__start = __buf + 1;
for (; '0' == *__start && '0' == __start [1]; ++__start);
+ // invert the sign if negative
__sign = __sign < 0;
// widen narrow digits optionally preceded by the minus sign
// into the basic_string object as required by 22.2.6.1.2, p1
- __pstr->resize ((__pcur - __start) + __sign);
+ __pstr->resize ((__pcur - __start) + _SizeT (__sign));
if (__sign)
_Traits::assign ((*__pstr)[0], __ctp.widen ('-'));
- __ctp.widen (__start, __pcur, &(*__pstr)[__sign]);
+ __ctp.widen (__start, __pcur, &(*__pstr)[_SizeT (__sign)]);
}
- const char *__grs = "";
- _RWSTD_SIZE_T __grn = 0;
+ const char *__grs = "";
+ _SizeT __grn = 0;
// 22.2.6.1.2, p1: thousands separators are optional
Modified: stdcxx/branches/4.2.x/include/loc/_money_get.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_money_get.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_money_get.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_money_get.h Fri Mar 14 08:16:33 2008
@@ -134,13 +134,13 @@
#if _RWSTD_INSTANTIATE (_MONEY_GET, _CHAR)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_get<char>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_get<char>);
#endif // _RWSTD_INSTANTIATE (_MONEY_GET, _CHAR)
#if _RWSTD_INSTANTIATE (_MONEY_GET, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_get<wchar_t>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_get<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_MONEY_GET, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_money_put.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_money_put.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_money_put.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_money_put.h Fri Mar 14 08:16:33 2008
@@ -120,13 +120,13 @@
#if _RWSTD_INSTANTIATE (_MONEY_PUT, _CHAR)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_put<char>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_put<char>);
#endif // _RWSTD_INSTANTIATE (_MONEY_PUT, _CHAR)
#if _RWSTD_INSTANTIATE (_MONEY_PUT, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT money_put<wchar_t>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_put<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_MONEY_PUT, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_moneypunct.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_moneypunct.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_moneypunct.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_moneypunct.h Fri Mar 14 08:16:33 2008
@@ -226,15 +226,15 @@
#if _RWSTD_INSTANTIATE (_MONEYPUNCT, _CHAR)
-_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct<char, true>);
-_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct<char, false>);
+_RWSTD_INSTANTIATE_2 (struct _RWSTD_TI_EXPORT moneypunct<char, true>);
+_RWSTD_INSTANTIATE_2 (struct _RWSTD_TI_EXPORT moneypunct<char, false>);
#endif // _RWSTD_INSTANTIATE (_MONEYPUNCT, _CHAR)
#if _RWSTD_INSTANTIATE (_MONEYPUNCT, _WCHAR_T)
-_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct<wchar_t, true>);
-_RWSTD_INSTANTIATE_2 (struct _RWSTD_EXPORT moneypunct<wchar_t, false>);
+_RWSTD_INSTANTIATE_2 (struct _RWSTD_TI_EXPORT moneypunct<wchar_t, true>);
+_RWSTD_INSTANTIATE_2 (struct _RWSTD_TI_EXPORT moneypunct<wchar_t, false>);
#endif // _RWSTD_INSTANTIATE (_MONEYPUNCT, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_num_get.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_num_get.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_num_get.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_num_get.h Fri Mar 14 08:16:33 2008
@@ -268,13 +268,13 @@
#if _RWSTD_INSTANTIATE (_NUM_GET, _CHAR)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_get<char>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT num_get<char>);
#endif // _RWSTD_INSTANTIATE (_NUM_GET, _CHAR)
#if _RWSTD_INSTANTIATE (_NUM_GET, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_get<wchar_t>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT num_get<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_NUM_GET, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_num_put.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_num_put.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_num_put.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_num_put.h Fri Mar 14 08:16:33 2008
@@ -218,13 +218,13 @@
#if _RWSTD_INSTANTIATE (_NUM_PUT, _CHAR)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_put<char>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT num_put<char>);
#endif // _RWSTD_INSTANTIATE (_NUM_PUT, _CHAR)
#if _RWSTD_INSTANTIATE (_NUM_PUT, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT num_put<wchar_t>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT num_put<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_NUM_PUT, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_numpunct.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_numpunct.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_numpunct.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_numpunct.h Fri Mar 14 08:16:33 2008
@@ -252,13 +252,13 @@
#if _RWSTD_INSTANTIATE (_NUMPUNCT, _CHAR)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT numpunct<char>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT numpunct<char>);
#endif // _RWSTD_INSTANTIATE (_NUMPUNCT, _CHAR)
#if _RWSTD_INSTANTIATE (_NUMPUNCT, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT numpunct<wchar_t>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT numpunct<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_NUMPUNCT, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_punct.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_punct.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_punct.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_punct.h Fri Mar 14 08:16:33 2008
@@ -139,14 +139,14 @@
#if _RWSTD_INSTANTIATE (_PUNCT, _CHAR)
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _RW::__rw_istreambuf_iterator
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _RW::__rw_istreambuf_iterator
__rw_match_name (_RWSTD_ARG_LIST (char)));
#endif // _RWSTD_INSTANTIATE (_PUNCT, _CHAR)
#if _RWSTD_INSTANTIATE (_PUNCT, _WCHAR_T)
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _RW::__rw_wistreambuf_iterator
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _RW::__rw_wistreambuf_iterator
__rw_match_name (_RWSTD_ARG_LIST (wchar_t)));
#endif // _RWSTD_INSTANTIATE (_PUNCT, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_time_get.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_time_get.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_time_get.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_time_get.h Fri Mar 14 08:16:33 2008
@@ -221,13 +221,13 @@
#if _RWSTD_INSTANTIATE (_TIME_GET, _CHAR)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT time_get<char>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT time_get<char>);
#endif // _RWSTD_INSTANTIATE (_TIME_GET, _CHAR)
#if _RWSTD_INSTANTIATE (_TIME_GET, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT time_get<wchar_t>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT time_get<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_TIME_GET, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/loc/_time_put.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_time_put.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_time_put.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_time_put.h Fri Mar 14 08:16:33 2008
@@ -120,13 +120,13 @@
#if _RWSTD_INSTANTIATE (_TIME_PUT, _CHAR)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT time_put<char>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT time_put<char>);
#endif // _RWSTD_INSTANTIATE (_TIME_PUT, _CHAR)
#if _RWSTD_INSTANTIATE (_TIME_PUT, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (struct _RWSTD_EXPORT time_put<wchar_t>);
+_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT time_put<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_TIME_PUT, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/ostream
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/ostream?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/ostream (original)
+++ stdcxx/branches/4.2.x/include/ostream Fri Mar 14 08:16:33 2008
@@ -244,14 +244,14 @@
// explicit instantiation followed by explicit specialization is illegal
// according to 14.6.4.1, p7 but MSVC allows it (linker errors otherwise)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_ostream<char, char_traits<char> >);
# endif // _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _CHAR)
# if _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _WCHAR_T)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_ostream<wchar_t, char_traits<wchar_t> >);
# endif // _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _WCHAR_T)
@@ -484,18 +484,6 @@
}
-// 21.3.7.9, p3 - defined here, declared inline in <string>
-template<class _CharT, class _Traits, class _Allocator>
-inline basic_ostream<_CharT, _Traits>&
-operator<< (basic_ostream<_CharT, _Traits> & __strm,
- const basic_string<_CharT, _Traits, _Allocator> &__str)
-{
- _RW::__rw_insert (__strm, __str.data (), __str.length (),
- __strm.width ());
- return __strm;
-}
-
-
#if defined (_MSC_VER) && _MSC_VER < 1310
// working around an MSVC bug that causes it to pick the member
@@ -554,14 +542,14 @@
# if _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _CHAR)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_ostream<char, char_traits<char> >);
# endif // _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _CHAR)
# if _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _WCHAR_T)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_ostream<wchar_t, char_traits<wchar_t> >);
# endif // _RWSTD_INSTANTIATE (_BASIC_OSTREAM, _WCHAR_T)
@@ -573,6 +561,12 @@
#if _RWSTD_DEFINE_TEMPLATE_LAST (_BASIC_OSTREAM)
# include <ostream.cc>
#endif // _RWSTD_DEFINE_TEMPLATE_LAST (_BASIC_OSTREAM)
+
+
+#ifndef _RWSTD_STRING_INSERTER_INCLUDED
+# define _RWSTD_INCLUDE_STRING_INSERTER
+# include <rw/_stringio.h>
+#endif // _RWSTD_STRING_INSERTER_INCLUDED
#endif // _RWSTD_OSTREAM_INCLUDED
Modified: stdcxx/branches/4.2.x/include/rw/_basic_ios.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_basic_ios.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_basic_ios.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_basic_ios.h Fri Mar 14 08:16:33 2008
@@ -344,14 +344,14 @@
#if _RWSTD_INSTANTIATE (_BASIC_IOS, _CHAR)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_ios<char, char_traits<char> >);
#endif // _RWSTD_INSTANTIATE (_BASIC_IOS, _CHAR)
#if _RWSTD_INSTANTIATE (_BASIC_IOS, _WCHAR_T)
-_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_2 (class _RWSTD_TI_EXPORT
basic_ios<wchar_t, char_traits<wchar_t> >);
#endif // _RWSTD_INSTANTIATE (_BASIC_IOS, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/rw/_config-msvc.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config-msvc.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_config-msvc.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_config-msvc.h Fri Mar 14 08:16:33 2008
@@ -48,21 +48,37 @@
# endif // _RWSTD_NO_STRING_NPOS_TYPE
#endif // MSVC <= 7.0
- // disable "Same type qualifier used more than once"
-# pragma warning (disable: 4114)
+// disable "Same type qualifier used more than once"
+#pragma warning (disable: 4114)
- // disable "return type for operator->' is not a UDT"
-# pragma warning (disable: 4284)
+// disable "return type for operator->' is not a UDT"
+#pragma warning (disable: 4284)
- // disable "nonstandard extension used :"
- // "'extern' before template explicit instantiation"
-# pragma warning (disable: 4231)
+// disable "nonstandard extension used :"
+// "'extern' before template explicit instantiation"
+#pragma warning (disable: 4231)
- // disable "decorated name length exceeded"
-# pragma warning (disable: 4503)
+// RWDLL - defined for all Rogue Wave(R) products built as shared libs
+// _RWSHARED - defined for libstd built/used as a shared lib
+#if defined (RWDLL) || defined (_RWSHARED)
- // disable "identifier was truncated to 255 characters"
-# pragma warning (disable: 4786)
+ // disable "class needs to have dll-interface to be used by cliens"
+# pragma warning (disable: 4251)
- // disable "'function': was declared deprecated"
-# pragma warning (disable: 4996)
+ // disable "non dll-interface class used as base for dll-interface class"
+# pragma warning (disable: 4275)
+
+#endif // RWDLL || _RWSHARED
+
+// disable "decorated name length exceeded"
+#pragma warning (disable: 4503)
+
+// disable "'identifier' : no suitable definition"
+// "provided for explicit template instantiation request"
+#pragma warning (disable: 4661)
+
+// disable "identifier was truncated to 255 characters"
+#pragma warning (disable: 4786)
+
+// disable "'function': was declared deprecated"
+#pragma warning (disable: 4996)
Modified: stdcxx/branches/4.2.x/include/rw/_defs.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_defs.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_defs.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_defs.h Fri Mar 14 08:16:33 2008
@@ -481,13 +481,6 @@
# define _RWSTD_CLASS_EXPORT _RWSTD_EXPORT
# define _RWSTD_MEMBER_EXPORT /* empty */
-
- // disable warnings:
- // C4251: class needs to have dll-interface to be used by cliens
- // C4275: non dll-interface class used as base for dll-interface class
-# pragma warning (disable: 4251)
-# pragma warning (disable: 4275)
-
#else
// disable Windows hacks
# define _RWSTD_EXPORT /* empty */
@@ -1306,6 +1299,13 @@
#endif // _RWSTD_NO_STRTOULL
+#ifdef _RWSTD_LIB_SRC
+# define _RWSTD_TI_EXPORT /* empty */
+#else // #ifndef _RWSTD_LIB_SRC
+# define _RWSTD_TI_EXPORT _RWSTD_EXPORT
+#endif // _RWSTD_LIB_SRC
+
+
#if defined (_RWSTD_INSTANTIATE_TEMPLATES) \
&& !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \
&& !defined (_RWSTD_NO_INSTANTIATE)
@@ -1319,6 +1319,9 @@
# define _RWSTD_INSTANTIATE_2(a1, a2) template a1, a2
# define _RWSTD_INSTANTIATE_3(a1, a2, a3) template a1, a2, a3
+# undef _RWSTD_TI_EXPORT
+# define _RWSTD_TI_EXPORT _RWSTD_EXPORT
+
# ifdef _RWSTD_NO_FUNCTION_EXPLICIT_INSTANTIATION
// replace explicit function template instantiations with
// declarations of explicit function template specializations
@@ -1332,12 +1335,8 @@
#elif defined (_MSC_VER) \
&& !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \
&& !defined (_RWSTD_NO_INSTANTIATE)
- // disable warning C4231: nonstandard extension used :
- // 'extern' before template explicit instantiation
-# pragma warning (disable: 4231)
# define _RWSTD_INSTANTIATE(ign1, type) (!_RWSTD_NO ## type)
-
# define _RWSTD_INSTANTIATE_1(arg) extern template arg
# define _RWSTD_INSTANTIATE_2(a1, a2) extern template a1, a2
# define _RWSTD_INSTANTIATE_3(a1, a2, a3) extern template a1, a2, a3
Modified: stdcxx/branches/4.2.x/include/rw/_ioinsert.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_ioinsert.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_ioinsert.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_ioinsert.h Fri Mar 14 08:16:33 2008
@@ -106,23 +106,23 @@
# ifndef _RWSTD_NO_NATIVE_BOOL
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, bool));
# endif // _RWSTD_NO_NATIVE_BOOL
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, long));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, unsigned long));
# ifdef _RWSTD_LONG_LONG
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, _RWSTD_LONG_LONG));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&,
unsigned _RWSTD_LONG_LONG));
@@ -133,12 +133,12 @@
#if _RWSTD_INSTANTIATE (_INSERT_DBL, _CHAR)
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, double));
# ifndef _RWSTD_NO_LONG_DOUBLE
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, long double));
# endif // _RWSTD_NO_LONG_DOUBLE
@@ -148,10 +148,10 @@
#if _RWSTD_INSTANTIATE (_INSERT_PTR, _CHAR)
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, const void*));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::ostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::ostream&
__rw_insert (_STD::ostream&, const char*,
_RWSTD_STREAMSIZE, _RWSTD_STREAMSIZE));
@@ -167,18 +167,18 @@
# endif // _RWSTD_NO_NATIVE_BOOL
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, long));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, unsigned long));
# ifdef _RWSTD_LONG_LONG
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, _RWSTD_LONG_LONG));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&,
unsigned _RWSTD_LONG_LONG));
@@ -188,12 +188,12 @@
#if _RWSTD_INSTANTIATE (_INSERT_DBL, _WCHAR_T)
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, double));
# ifndef _RWSTD_NO_LONG_DOUBLE
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, long double));
# endif // _RWSTD_NO_LONG_DOUBLE
@@ -202,14 +202,14 @@
#if _RWSTD_INSTANTIATE (_INSERT_PTR, _WCHAR_T)
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, const void*));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, const char*,
_RWSTD_STREAMSIZE, _RWSTD_STREAMSIZE));
-_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_EXPORT _STD::wostream&
+_RWSTD_INSTANTIATE_FUN_1 (_RWSTD_TI_EXPORT _STD::wostream&
__rw_insert (_STD::wostream&, const wchar_t*,
_RWSTD_STREAMSIZE, _RWSTD_STREAMSIZE));
Modified: stdcxx/branches/4.2.x/include/rw/_mutex.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_mutex.h?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_mutex.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_mutex.h Fri Mar 14 08:16:33 2008
@@ -409,8 +409,8 @@
// explicitly instantiated to work around a g++ 2.95.2 bug on COFF systems
// (such as IBM AIX or DEC OSF1) where it "forgets" to do so implicitly for
// explicitly initialized static data members
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_static_mutex<int>);
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT __rw_static_mutex<size_t>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT __rw_static_mutex<int>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT __rw_static_mutex<size_t>);
#endif // _RWSTD_INSTANTIATE (_STATIC_MUTEX, _INT)
Modified: stdcxx/branches/4.2.x/include/sstream
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/sstream?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/sstream (original)
+++ stdcxx/branches/4.2.x/include/sstream Fri Mar 14 08:16:33 2008
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -198,7 +198,7 @@
__last = this->egptr ();
}
- return _C_string_type (__first, __last - __first);
+ return _C_string_type (__first, __last);
}
@@ -465,13 +465,13 @@
#if _RWSTD_INSTANTIATE (_BASIC_STRINGBUF, _CHAR)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT basic_stringbuf<char>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT basic_stringbuf<char>);
#endif // _RWSTD_INSTANTIATE (_BASIC_STRINGBUF, _CHAR)
#if _RWSTD_INSTANTIATE (_BASIC_STRINGBUF, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT basic_stringbuf<wchar_t>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT basic_stringbuf<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_BASIC_STRINGBUF, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/streambuf
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/streambuf?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/streambuf (original)
+++ stdcxx/branches/4.2.x/include/streambuf Fri Mar 14 08:16:33 2008
@@ -535,13 +535,13 @@
#if _RWSTD_INSTANTIATE (_BASIC_STREAMBUF, _CHAR)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT basic_streambuf<char>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT basic_streambuf<char>);
#endif // _RWSTD_INSTANTIATE (_BASIC_STREAMBUF, _CHAR)
#if _RWSTD_INSTANTIATE (_BASIC_STREAMBUF, _WCHAR_T)
-_RWSTD_INSTANTIATE_1 (class _RWSTD_EXPORT basic_streambuf<wchar_t>);
+_RWSTD_INSTANTIATE_1 (class _RWSTD_TI_EXPORT basic_streambuf<wchar_t>);
#endif // _RWSTD_INSTANTIATE (_BASIC_STREAMBUF, _WCHAR_T)
Modified: stdcxx/branches/4.2.x/include/string
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/string?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/string (original)
+++ stdcxx/branches/4.2.x/include/string Fri Mar 14 08:16:33 2008
@@ -1509,14 +1509,12 @@
}
-// 21.3.7.9, p3 - declared here, defined inline in <ostream>
-template<class _CharT, class _Traits, class _Allocator>
-inline basic_ostream<_CharT, _Traits>&
-operator<< (basic_ostream<_CharT, _Traits>&,
- const basic_string<_CharT, _Traits, _Allocator>&);
+} // namespace std
-} // namespace std
+#ifndef _RWSTD_RW_STRINGIO_H_INCLUDED
+# include <rw/_stringio.h>
+#endif // _RWSTD_RW_STRINGIO_H_INCLUDED
_RWSTD_NAMESPACE (__rw) {
@@ -1610,7 +1608,7 @@
#if _RWSTD_INSTANTIATE (_BASIC_STRING, _CHAR)
-_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_3 (class _RWSTD_TI_EXPORT
basic_string<char, char_traits<char>,
allocator<char> >);
@@ -1618,7 +1616,7 @@
#if _RWSTD_INSTANTIATE (_BASIC_STRING, _WCHAR_T)
-_RWSTD_INSTANTIATE_3 (class _RWSTD_EXPORT
+_RWSTD_INSTANTIATE_3 (class _RWSTD_TI_EXPORT
basic_string<wchar_t, char_traits<wchar_t>,
allocator<wchar_t> >);
Modified: stdcxx/branches/4.2.x/src/export.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/export.cpp?rev=637130&r1=637129&r2=637130&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/export.cpp (original)
+++ stdcxx/branches/4.2.x/src/export.cpp Fri Mar 14 08:16:33 2008
@@ -114,6 +114,9 @@
#include <rw/_basic_ios.h>
#include <rw/_basic_ios.cc>
+#include <rw/_stringio.h>
+#include <rw/_stringio.cc>
+
#include <rw/_heap.h>
#include <rw/_heap.cc>