* libsupc++/eh_alloc.cc: Ensure that required macros are
defined before including gthr.h. Ensure that we get the
version of gthr.h for which we know how to provide a
configuration.
* libsupc++/eh_globals.cc: Likewise. And, bring the threading
code path into line with the current EH model. Use std, where
appropriate.
Co-Authored-By: John David Anglin <dave@hiauly1.hia.nrc.ca>
From-SVN: r42999
* config/threads-no.h: Remove file.
* config/threads-posix.h: Remove file.
* acconfig.h (_GLIBCPP_USE_THREADS): Remove.
(_GLIBCPP_SUPPORTS_WEAK): Add (required by namespace-clean gthr*.h).
(_GLIBCPP_HAVE_GTHR_DEFAULT): Likewise.
* config.h.in: Regenerate.
* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Completely rework to
setup and use gthr*.h files. In particular, make gthr.h files
namespace-clean in the staging area (they don't have to be for
libgcc.a).
* aclocal.m4: Regenerate.
* configure: Regenerate.
* src/Makefile.am (build_headers): Remove bits/c++threads.h
and add bits/gthr.h bits/gthr-single.h bits/gthr-default.h.
* src/Makefile.in: Regenerate.
* include/bits/c++config: Cleanup threading configuration macros.
In particular, define __STL_GTHREADS macro which controls...
* include/bits/stl_threads.h: ...a brand new gthr.h-based
configuration here.
* config/c_io_stdio.h: Include staged gthr.h instead of local
thread configuration file. Always use __gthread_mutex_t
instead of __mutext_type (or int).
* include/bits/std_fstream.h: Likewise.
* docs/html/17_intro/howto.html: Remove placeholder comment in
case this configuration patch didn't make it. Add advice that
section only applies if configured with --enable-threads.
* docs/html/23_containers/howto.html: Reword to make clear
that _PTHREADS is no longer required for any port to be
correctly using STL with threads. Add advice that section
only applies if configured with --enable-threads.
Co-Authored-By: John David Anglin <dave@hiauly1.hia.nrc.ca>
From-SVN: r42998
2001-06-04 Kenny Simpson <theonetruekenny@yahoo.com>
Phil Edwards <pme@sources.redhat.com>
PR libstdc++/3035 and PR libstdc++/3036
* include/bits/stl_pair.h: Fix pair ctor and make_pair according
to LWG DR 181 and 265.
Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>
From-SVN: r42865
* libsupc++/Makefile.am (install-glibcppinstallHEADERS,
uninstall-glibcppinstallHEADERS): Have explicit rules catering to
SUN make VPATH peculiarities.
* libsupc++/Makefile.in: Regenerate.
From-SVN: r42844
* src/Makefile.am (VPATH): Delimit with ":", not space.
* src/Makefile.in: Regenerate.
* configure.in (use of GLIBCPP_CHECK_GNU_MAKE): Don't fail if GNU
make isn't found.
* configure: Regenerate.
From-SVN: r42774
* include/bits/c++config (__USE_MALLOC): Do not define it.
Document why not and give pointers to more information.
* docs/html/23_containers/howto.html: Update documentation
to reflect recent understanding of problem.
* docs/html/17_intro/howto.html: Likewise.
From-SVN: r42732
2001-05-29 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* include/c_std/bits/std_cstdlib.h:: Move C99 thingies to __gnu_cxx::.
* include/c_std/bits/std_cwchar.h (__gnu_cxx): Likewise.
2001-05-27 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* include/c_std/bits/std_cmath.h: Move C99 functions in __gnu_cxx::.
* include/c_std/bits/std_cstdlib.h: Same.
* include/c_std/bits/std_cwchar.h: Same.
From-SVN: r42707
* include/c_std/bits/std_cmath.h: Tweak. #define away abs, cos,
fabs, sin, sqrt. They are now implemented in terms of __builtin_
variants.
From-SVN: r42595
2001-05-24 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/2830
* testsuite/21_strings/inserters_extractors.cc (test09): New test.
* include/bits/ostream.tcc: Format to match istream.tcc.
(operator<<(basic_ostream __out, const basic_string __s)): Fix.
From-SVN: r42557
* include/c_std/bin/std_cstring.h: #define away all global
functions we will redeclare in namespace `std'.
* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Use
std::memset, instead of memset.
* testsuite/19_diagnostics/stdexceptions.cc: Use `std::strcmp',
not plain `strcmp'.
* testsuite/21_strings/c_strings.cc: Use `std::strcpy' instead of
plain `strcpy'.
From-SVN: r42555
2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
* mkcheck.in (static_fail): Remove S_FLAG decoration on output.
* include/bits/std_sstream.h (stringbuf::setbuf): Require both
arguments to be non-null.
* include/bits/fstream.tcc (filebuf::_M_allocate_buffers): Only
try allocations if allocated size is greater than zero.
(filebuf::_M_filebuf_init): Change to
(filebuf::_M_allocate_file): Which is what it does now.
(filebuf::_M_allocate_bufers): Change to
(filebuf::_M_allocate_internal_buffer): This, and create
(filebuf::_M_allocate_pback_buffer): New.
(filebuf::_M_destroy_internal_buffer): New.
(filebuf::_M_buf_allocated): New data member.
(filebuf::setbuf): Use new logic, allow use of external buffer.
* testsuite/27_io/stringbuf_virtuals.cc: New file.
* testsuite/27_io/filebuf_virtuals.cc: New file.
From-SVN: r42458
* ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.254. Rebuilt a number
of subdir/configure scripts to use the new libtool.m4.
From-SVN: r42351
2001-05-18 Angela Marie Thomas <angela@cygnus.com>
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags
appropriately for remote testing and testing installed files without
a build dir.
From-SVN: r42272
* include/bits/std_valarray.h (valarray<>::operator[] const):
Return a const reference.
* testsuite/26_numerics/valarray_const_bracket.cc: New test.
From-SVN: r42245
2001-05-18 Angela Marie Thomas <angela@cygnus.com>
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-dg-test): Set
output_file based on the name of the testcase.
2001-05-18 Angela Marie Thomas <angela@cygnus.com>
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Build
gluefile and use it if needs_status_wrapper is set.
From-SVN: r42240