This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] update docs, tweaks
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 May 2002 06:57:21 -0700
- Subject: [v3] update docs, tweaks
tested x86/linux. This is queued for 3.1.1.
2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/fstream.tcc
(basic_filebuf::_M_allocate_internal_buffer): Remove extraneous
try/catch blocks.
* src/localename.cc (locale::_Impl::_M_install_facet): Same.
* docs/html/install.html: Tweak, add bits about required locales
for the 22_locale tests when using the gnu model.
* testsuite/27_io/istream_sentry.cc: Tweak.
Index: docs/html/install.html
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/install.html,v
retrieving revision 1.13
diff -c -p -r1.13 install.html
*** docs/html/install.html 1 Apr 2002 21:56:42 -0000 1.13
--- docs/html/install.html 13 May 2002 13:56:02 -0000
***************
*** 67,98 ****
<p>As of June 19, 2000, libstdc++ attempts to use tricky and
space-saving features of the GNU toolchain, enabled with
! <code>-ffunction-sections -fdata-sections -Wl,--gc-sections</code>.
! To obtain maximum benefit from this, binutils after this date
! should also be used (bugs were fixed with C++ exception handling
! related to this change in libstdc++-v3). The version of these
! tools should be <code>2.10.90</code>, and you can get snapshots (as
! well as releases) of binutils
! <a href="ftp://sources.redhat.com/pub/binutils">here</a>.
</p>
<p>If you are using a 3.1-series libstdc++ snapshot, then the
! requirements are slightly more stringent: the compiler sources must
! also be 3.1 or later (for both technical and licensing reasons), and
! your binutils must be 2.11.95 or later if you want to use symbol
! versioning in shared libraries.
</p>
! <!-- Commented until some system-specific requirements appear.
! <p>Finally, a few system-specific requirements:
<dl>
! <dt>Cygwin
! <dd>If you are using Cygwin to compile libstdc++-v3 on Win32, you'll
! [snip]
</dl>
</p>
- -->
<hr>
--- 67,123 ----
<p>As of June 19, 2000, libstdc++ attempts to use tricky and
space-saving features of the GNU toolchain, enabled with
! <code>-ffunction-sections -fdata-sections
! -Wl,--gc-sections</code>. To obtain maximum benefit from this,
! binutils after this date should also be used (bugs were fixed
! with C++ exception handling related to this change in
! libstdc++-v3). The version of these tools should be
! <code>2.10.90</code>, or later, and you can get snapshots (as
! well as releases) of binutils
! <a href="ftp://sources.redhat.com/pub/binutils">here</a>. The
! configure process will automatically detect and use these
! features if the underlying support is present.
</p>
<p>If you are using a 3.1-series libstdc++ snapshot, then the
! requirements are slightly more stringent: the compiler sources
! must also be 3.1 or later (for both technical and licensing
! reasons), and your binutils must be 2.11.95 or later if you want
! to use symbol versioning in shared libraries. Again, the
! configure process will automatically detect and use these
! features if the underlying support is present.
</p>
! <p>Finally, a few system-specific requirements:
<dl>
! <dt> linux
+ <dd>If you are using gcc 3.1 or later on linux, and are using
+ the gnu locale model (enabled by default for sufficient
+ versions of glibc), the following locales are used and tested
+ in the libstdc++ testsuites: en_HK, en_US, fr_FR, fr_FR@euro,
+ de_DE, de_DE@euro, ja_JP.eucjp, and it_IT. Failure to have the
+ underlying "C" library locale information installed will mean
+ that C++ named locales for the above regions will not work:
+ because of this, the libstdc++ testsuite will not pass the
+ named locale tests. If this isn't an issue, don't worry about
+ it. If named locales are needed, the underlying locale
+ information must be installed. Note that rebuilding libstdc++
+ after locales are installed is not necessary.
+
+ <p> To install
+ support for locales, do only one of the following: </p>
+ <p>
+ <li> install all locales
+ <p> <code> export LC_ALL=C </code> </p>
+ <p> <code> rpm -e glibc-common --nodeps </code> </p>
+ <p> <code> rpm -i --define "_install_langs all"
+ glibc-common-2.2.5-34.i386.rpm </code> </p>
+ <li> install just the necessary locales
+ <p> <code> localedef -i de_DE -f ISO-8859-1 de_DE </code> </p>
+ </p>
</dl>
</p>
<hr>
Index: include/bits/fstream.tcc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/fstream.tcc,v
retrieving revision 1.37
diff -c -p -r1.37 fstream.tcc
*** include/bits/fstream.tcc 3 May 2002 18:22:58 -0000 1.37
--- include/bits/fstream.tcc 13 May 2002 13:56:04 -0000
*************** namespace std
*** 49,60 ****
_M_buf_size = _M_buf_size_opt;
// Allocate internal buffer.
! try { _M_buf = new char_type[_M_buf_size]; }
! catch(...)
! {
! delete [] _M_buf;
! __throw_exception_again;
! }
_M_buf_allocated = true;
}
}
--- 49,55 ----
_M_buf_size = _M_buf_size_opt;
// Allocate internal buffer.
! _M_buf = new char_type[_M_buf_size];
_M_buf_allocated = true;
}
}
Index: src/localename.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/localename.cc,v
retrieving revision 1.26
diff -c -p -r1.26 localename.cc
*** src/localename.cc 16 Apr 2002 00:45:32 -0000 1.26
--- src/localename.cc 13 May 2002 13:56:04 -0000
*************** namespace std
*** 255,267 ****
facet** __old = _M_facets;
facet** __new;
const size_t __new_size = __index + 4;
! try
! { __new = new facet*[__new_size]; }
! catch(...)
! {
! delete [] __new;
! __throw_exception_again;
! }
for (size_t __i = 0; __i < _M_facets_size; ++__i)
__new[__i] = _M_facets[__i];
for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2)
--- 255,261 ----
facet** __old = _M_facets;
facet** __new;
const size_t __new_size = __index + 4;
! __new = new facet*[__new_size];
for (size_t __i = 0; __i < _M_facets_size; ++__i)
__new[__i] = _M_facets[__i];
for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2)
Index: testsuite/27_io/istream_sentry.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/istream_sentry.cc,v
retrieving revision 1.6
diff -c -p -r1.6 istream_sentry.cc
*** testsuite/27_io/istream_sentry.cc 7 Aug 2001 03:38:33 -0000 1.6
--- testsuite/27_io/istream_sentry.cc 13 May 2002 13:56:04 -0000
*************** test02()
*** 70,76 ****
double x;
// ios_base::eof == 2
! while(in >> x)
{
++i;
if (i > 3)
--- 70,76 ----
double x;
// ios_base::eof == 2
! while (in >> x)
{
++i;
if (i > 3)