From e3f78d9b1161f68289db5b09304598bb0ee7d441 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Wed, 6 Oct 2004 22:12:34 +0000 Subject: acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread. 2004-10-06 Benjamin Kosnik * acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread. (GLIBCXX_CONFIGURE_TESTSUITE): Use it. * configure: Regenerated. * testsuite/Makefile.am (CLEANFILES): Add TEST for check-performance executables. (stamp_thread): New. (all-local): Use it. * testsuite/Makefile.in: Regenerate. * scripts/create_testsuite_files: Filter thread tests. * testsuite/thread/pthread1.cc: Remove macro conditionals: this file will only be run by thread enabled configurations. * testsuite/thread/pthread7-rope.cc: Same, add rope_type typedef. * testsuite/thread/pthread6.cc: Same. * testsuite/thread/pthread5.cc: Same. * testsuite/thread/pthread4.cc: Same. * testsuite/thread/pthread3.cc: Same. * testsuite/thread/pthread2.cc: Same. * testsuite/ext/mt_allocator/instantiate.cc: Add in __GTHREADS guard. * testsuite/ext/mt_allocator/deallocate_global-1.cc: Move to... * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: ...here. * testsuite/ext/mt_allocator/deallocate_global-3.cc: Move to... * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: ...here. * testsuite/ext/mt_allocator/deallocate_local-1.cc: Move to... * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: ...here. * testsuite/ext/mt_allocator/deallocate_local-3.cc: Move to... * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: ...here. From-SVN: r88628 --- libstdc++-v3/ChangeLog | 31 +++++++++ libstdc++-v3/Makefile.in | 2 + libstdc++-v3/acinclude.m4 | 5 ++ libstdc++-v3/configure | 25 ++++++- libstdc++-v3/include/Makefile.in | 2 + libstdc++-v3/libmath/Makefile.in | 2 + libstdc++-v3/libsupc++/Makefile.in | 2 + libstdc++-v3/po/Makefile.in | 2 + libstdc++-v3/scripts/create_testsuite_files | 17 +++-- libstdc++-v3/src/Makefile.in | 2 + libstdc++-v3/testsuite/Makefile.am | 12 +++- libstdc++-v3/testsuite/Makefile.in | 11 ++- .../ext/mt_allocator/deallocate_global-1.cc | 75 --------------------- .../ext/mt_allocator/deallocate_global-3.cc | 75 --------------------- .../ext/mt_allocator/deallocate_global_thread-1.cc | 75 +++++++++++++++++++++ .../ext/mt_allocator/deallocate_global_thread-3.cc | 75 +++++++++++++++++++++ .../ext/mt_allocator/deallocate_local-1.cc | 78 ---------------------- .../ext/mt_allocator/deallocate_local-3.cc | 78 ---------------------- .../ext/mt_allocator/deallocate_local_thread-1.cc | 78 ++++++++++++++++++++++ .../ext/mt_allocator/deallocate_local_thread-3.cc | 78 ++++++++++++++++++++++ .../testsuite/ext/mt_allocator/instantiate.cc | 6 +- libstdc++-v3/testsuite/thread/pthread1.cc | 4 -- libstdc++-v3/testsuite/thread/pthread2.cc | 5 -- libstdc++-v3/testsuite/thread/pthread3.cc | 5 -- libstdc++-v3/testsuite/thread/pthread4.cc | 4 -- libstdc++-v3/testsuite/thread/pthread5.cc | 4 -- libstdc++-v3/testsuite/thread/pthread6.cc | 5 -- libstdc++-v3/testsuite/thread/pthread7-rope.cc | 14 ++-- 28 files changed, 418 insertions(+), 354 deletions(-) delete mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc delete mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc create mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc create mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc delete mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc delete mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc create mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc create mode 100644 libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c87cda9..34fea61 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,4 +1,35 @@ 2004-10-06 Benjamin Kosnik + + * acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread. + (GLIBCXX_CONFIGURE_TESTSUITE): Use it. + * configure: Regenerated. + * testsuite/Makefile.am (CLEANFILES): Add TEST for + check-performance executables. + (stamp_thread): New. + (all-local): Use it. + * testsuite/Makefile.in: Regenerate. + * scripts/create_testsuite_files: Filter thread tests. + + * testsuite/thread/pthread1.cc: Remove macro conditionals: this + file will only be run by thread enabled configurations. + * testsuite/thread/pthread7-rope.cc: Same, add rope_type typedef. + * testsuite/thread/pthread6.cc: Same. + * testsuite/thread/pthread5.cc: Same. + * testsuite/thread/pthread4.cc: Same. + * testsuite/thread/pthread3.cc: Same. + * testsuite/thread/pthread2.cc: Same. + + * testsuite/ext/mt_allocator/instantiate.cc: Add in __GTHREADS guard. + * testsuite/ext/mt_allocator/deallocate_global-1.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: ...here. + * testsuite/ext/mt_allocator/deallocate_global-3.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: ...here. + * testsuite/ext/mt_allocator/deallocate_local-1.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: ...here. + * testsuite/ext/mt_allocator/deallocate_local-3.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: ...here. + +2004-10-06 Benjamin Kosnik Paolo Carlini PR libstdc++/17780 diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index a25d559..06d8eaf 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -150,6 +150,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 6c9f13a..0bd4aa6 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -620,6 +620,8 @@ dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this. dnl dnl Sets: dnl enable_abi_check / GLIBCXX_TEST_ABI +dnl GLIBCXX_TEST_WCHAR_T +dnl GLIBCXX_TEST_THREAD dnl Substs: dnl baseline_dir dnl @@ -652,6 +654,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [ AC_SUBST(baseline_dir) GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes) + GLIBCXX_CONDITIONAL(GLIBCXX_TEST_THREAD, test $enable_thread = yes) GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes) ]) @@ -1708,8 +1711,10 @@ AC_DEFUN([GLIBCXX_ENABLE_THREADS], [ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'` AC_MSG_RESULT([$target_thread_file]) + enable_thread=no if test $target_thread_file != single; then AC_DEFINE(HAVE_GTHR_DEFAULT) + enable_thread=yes fi glibcxx_thread_h=gthr-$target_thread_file.h diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 0a8f404..8fe56ec 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_THREAD_TRUE GLIBCXX_TEST_THREAD_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -7728,11 +7728,13 @@ echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $target_thread_file" >&5 echo "${ECHO_T}$target_thread_file" >&6 + enable_thread=no if test $target_thread_file != single; then cat >>confdefs.h <<\_ACEOF #define HAVE_GTHR_DEFAULT 1 _ACEOF + enable_thread=yes fi glibcxx_thread_h=gthr-$target_thread_file.h @@ -97355,6 +97357,7 @@ done + # Propagate the target-specific source directories through the build chain. ATOMICITY_SRCDIR=config/${atomicity_dir} ATOMIC_WORD_SRCDIR=config/${atomic_word_dir} @@ -97460,6 +97463,17 @@ fi +if test $enable_thread = yes; then + GLIBCXX_TEST_THREAD_TRUE= + GLIBCXX_TEST_THREAD_FALSE='#' +else + GLIBCXX_TEST_THREAD_TRUE='#' + GLIBCXX_TEST_THREAD_FALSE= +fi + + + + if test $enable_abi_check = yes; then GLIBCXX_TEST_ABI_TRUE= GLIBCXX_TEST_ABI_FALSE='#' @@ -97828,6 +97842,13 @@ echo "$as_me: error: conditional \"GLIBCXX_TEST_WCHAR_T\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${GLIBCXX_TEST_THREAD_TRUE}" && test -z "${GLIBCXX_TEST_THREAD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_TEST_THREAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GLIBCXX_TEST_THREAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${GLIBCXX_TEST_ABI_TRUE}" && test -z "${GLIBCXX_TEST_ABI_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_TEST_ABI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -98508,6 +98529,8 @@ s,@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@,$GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE,;t s,@baseline_dir@,$baseline_dir,;t t s,@GLIBCXX_TEST_WCHAR_T_TRUE@,$GLIBCXX_TEST_WCHAR_T_TRUE,;t t s,@GLIBCXX_TEST_WCHAR_T_FALSE@,$GLIBCXX_TEST_WCHAR_T_FALSE,;t t +s,@GLIBCXX_TEST_THREAD_TRUE@,$GLIBCXX_TEST_THREAD_TRUE,;t t +s,@GLIBCXX_TEST_THREAD_FALSE@,$GLIBCXX_TEST_THREAD_FALSE,;t t s,@GLIBCXX_TEST_ABI_TRUE@,$GLIBCXX_TEST_ABI_TRUE,;t t s,@GLIBCXX_TEST_ABI_FALSE@,$GLIBCXX_TEST_ABI_FALSE,;t t s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index b6f4be7..bc35f0c 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -117,6 +117,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in index 87b0dae..03b598b 100644 --- a/libstdc++-v3/libmath/Makefile.in +++ b/libstdc++-v3/libmath/Makefile.in @@ -134,6 +134,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 765d4c9..9c622e0 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -173,6 +173,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index 3694b33..edd8f27 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -117,6 +117,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/scripts/create_testsuite_files b/libstdc++-v3/scripts/create_testsuite_files index 50f2e13..582f8f5 100755 --- a/libstdc++-v3/scripts/create_testsuite_files +++ b/libstdc++-v3/scripts/create_testsuite_files @@ -47,15 +47,22 @@ else grep -v wchar_t $tmp.1 > $tmp.2 fi +# If the library is not configured to support threads, don't run those tests. +if test -f "$outdir/testsuite_thread"; then + mv $tmp.2 $tmp.3 +else + grep -v thread $tmp.2 > $tmp.3 +fi + # Now filter out classes of tests. These classes are run using special rules. -grep _xin $tmp.2 > $tests_file_inter -grep -v _xin $tmp.2 > $tmp.3 +grep _xin $tmp.3 > $tests_file_inter +grep -v _xin $tmp.3 > $tmp.4 -grep performance $tmp.3 > $tests_file_perf -grep -v performance $tmp.3 > $tmp.4 +grep performance $tmp.4 > $tests_file_perf +grep -v performance $tmp.4 > $tmp.5 # ...more filters go here. -cp $tmp.4 $tests_file_normal +cp $tmp.5 $tests_file_normal rm $tmp* exit 0 diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 9164452..ba9df3c 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -152,6 +152,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index 9e11ac3..a003497 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -57,7 +57,7 @@ endif abi_check_SOURCES = abi_check.cc abi_check_DEPENDENCIES = libv3test.a -all-local: stamp_wchar testsuite_files +all-local: stamp_wchar stamp_thread testsuite_files # Enable wchar_t tests if capable. if GLIBCXX_TEST_WCHAR_T @@ -67,6 +67,14 @@ else stamp_wchar: endif +# Enable thread tests if capable. +if GLIBCXX_TEST_THREAD +stamp_thread: + touch testsuite_thread +else +stamp_thread: +endif + # Generated lists of files to run. All of these names are valid make # targets, if you wish to generate a list manually. lists_of_files = \ @@ -183,4 +191,4 @@ check-script check-script-install check-performance # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ - testsuite_* site.exp abi_check baseline_symbols + testsuite_* site.exp abi_check baseline_symbols *TEST* diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index 3a79b7e..1005b34 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -146,6 +146,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ @@ -311,7 +313,7 @@ performance_script = ${glibcxx_srcdir}/scripts/check_performance # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ - testsuite_* site.exp abi_check baseline_symbols + testsuite_* site.exp abi_check baseline_symbols *TEST* all: all-am @@ -575,13 +577,18 @@ uninstall-am: uninstall-info-am tags uninstall uninstall-am uninstall-info-am -all-local: stamp_wchar testsuite_files +all-local: stamp_wchar stamp_thread testsuite_files # Enable wchar_t tests if capable. @GLIBCXX_TEST_WCHAR_T_TRUE@stamp_wchar: @GLIBCXX_TEST_WCHAR_T_TRUE@ touch testsuite_wchar_t @GLIBCXX_TEST_WCHAR_T_FALSE@stamp_wchar: +# Enable thread tests if capable. +@GLIBCXX_TEST_THREAD_TRUE@stamp_thread: +@GLIBCXX_TEST_THREAD_TRUE@ touch testsuite_thread +@GLIBCXX_TEST_THREAD_FALSE@stamp_thread: + # We need more things in site.exp, but automake completely controls the # creation of that file; there's no way to append to it without messing up # the dependancy chains. So we overrule automake. This rule is exactly diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc deleted file mode 100644 index 1f0ac28..0000000 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (C) 2004 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 20.4.1.1 allocator members - -#include -#include -#include -#include - -static size_t count; - -struct count_check -{ - count_check() {} - ~count_check() - { - if (count != 0) - throw std::runtime_error("count isn't zero"); - } -}; - -static count_check check; - -void* operator new(size_t size) throw(std::bad_alloc) -{ - printf("operator new is called \n"); - void* p = malloc(size); - if (p == NULL) - throw std::bad_alloc(); - count++; - return p; -} - -void operator delete(void* p) throw() -{ - printf("operator delete is called \n"); - if (p == NULL) - return; - count--; - if (count == 0) - printf("All memory released \n"); - else - printf("%u allocations to be released \n", count); - free(p); -} - -typedef char char_t; -typedef std::char_traits traits_t; -typedef __gnu_cxx::__common_pool_policy pool_t; -typedef __gnu_cxx::__mt_alloc allocator_t; -typedef std::basic_string string_t; - -string_t s("bayou bend"); - -int main() -{ - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc deleted file mode 100644 index 10efea6..0000000 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (C) 2004 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 20.4.1.1 allocator members - -#include -#include -#include -#include - -static size_t count; - -struct count_check -{ - count_check() {} - ~count_check() - { - if (count != 0) - throw std::runtime_error("count isn't zero"); - } -}; - -static count_check check; - -void* operator new(size_t size) throw(std::bad_alloc) -{ - printf("operator new is called \n"); - void* p = malloc(size); - if (p == NULL) - throw std::bad_alloc(); - count++; - return p; -} - -void operator delete(void* p) throw() -{ - printf("operator delete is called \n"); - if (p == NULL) - return; - count--; - if (count == 0) - printf("All memory released \n"); - else - printf("%u allocations to be released \n", count); - free(p); -} - -typedef char char_t; -typedef std::char_traits traits_t; -typedef __gnu_cxx::__per_type_pool_policy pool_t; -typedef __gnu_cxx::__mt_alloc allocator_t; -typedef std::basic_string string_t; - -string_t s("bayou bend"); - -int main() -{ - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc new file mode 100644 index 0000000..1f0ac28 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc @@ -0,0 +1,75 @@ +// +// Copyright (C) 2004 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 20.4.1.1 allocator members + +#include +#include +#include +#include + +static size_t count; + +struct count_check +{ + count_check() {} + ~count_check() + { + if (count != 0) + throw std::runtime_error("count isn't zero"); + } +}; + +static count_check check; + +void* operator new(size_t size) throw(std::bad_alloc) +{ + printf("operator new is called \n"); + void* p = malloc(size); + if (p == NULL) + throw std::bad_alloc(); + count++; + return p; +} + +void operator delete(void* p) throw() +{ + printf("operator delete is called \n"); + if (p == NULL) + return; + count--; + if (count == 0) + printf("All memory released \n"); + else + printf("%u allocations to be released \n", count); + free(p); +} + +typedef char char_t; +typedef std::char_traits traits_t; +typedef __gnu_cxx::__common_pool_policy pool_t; +typedef __gnu_cxx::__mt_alloc allocator_t; +typedef std::basic_string string_t; + +string_t s("bayou bend"); + +int main() +{ + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc new file mode 100644 index 0000000..10efea6 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc @@ -0,0 +1,75 @@ +// +// Copyright (C) 2004 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 20.4.1.1 allocator members + +#include +#include +#include +#include + +static size_t count; + +struct count_check +{ + count_check() {} + ~count_check() + { + if (count != 0) + throw std::runtime_error("count isn't zero"); + } +}; + +static count_check check; + +void* operator new(size_t size) throw(std::bad_alloc) +{ + printf("operator new is called \n"); + void* p = malloc(size); + if (p == NULL) + throw std::bad_alloc(); + count++; + return p; +} + +void operator delete(void* p) throw() +{ + printf("operator delete is called \n"); + if (p == NULL) + return; + count--; + if (count == 0) + printf("All memory released \n"); + else + printf("%u allocations to be released \n", count); + free(p); +} + +typedef char char_t; +typedef std::char_traits traits_t; +typedef __gnu_cxx::__per_type_pool_policy pool_t; +typedef __gnu_cxx::__mt_alloc allocator_t; +typedef std::basic_string string_t; + +string_t s("bayou bend"); + +int main() +{ + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc deleted file mode 100644 index 5664d3c..0000000 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (C) 2004 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 20.4.1.1 allocator members - -#include -#include -#include -#include - -static size_t count; - -struct count_check -{ - count_check() {} - ~count_check() - { - if (count != 0) - throw std::runtime_error("count isn't zero"); - } -}; - -static count_check check; - -void* operator new(size_t size) throw(std::bad_alloc) -{ - printf("operator new is called \n"); - void* p = malloc(size); - if (p == NULL) - throw std::bad_alloc(); - count++; - return p; -} - -void operator delete(void* p) throw() -{ - printf("operator delete is called \n"); - if (p == NULL) - return; - count--; - if (count == 0) - printf("All memory released \n"); - else - printf("%u allocations to be released \n", count); - free(p); -} - -typedef char char_t; -typedef std::char_traits traits_t; -typedef __gnu_cxx::__common_pool_policy pool_t; -typedef __gnu_cxx::__mt_alloc allocator_t; -typedef std::basic_string string_t; - -int main() -{ - bool test __attribute__((unused)) = true; - { - string_t s; - s += "bayou bend"; - } - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc deleted file mode 100644 index 973f758..0000000 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (C) 2004 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 20.4.1.1 allocator members - -#include -#include -#include -#include - -static size_t count; - -struct count_check -{ - count_check() {} - ~count_check() - { - if (count != 0) - throw std::runtime_error("count isn't zero"); - } -}; - -static count_check check; - -void* operator new(size_t size) throw(std::bad_alloc) -{ - printf("operator new is called \n"); - void* p = malloc(size); - if (p == NULL) - throw std::bad_alloc(); - count++; - return p; -} - -void operator delete(void* p) throw() -{ - printf("operator delete is called \n"); - if (p == NULL) - return; - count--; - if (count == 0) - printf("All memory released \n"); - else - printf("%u allocations to be released \n", count); - free(p); -} - -typedef char char_t; -typedef std::char_traits traits_t; -typedef __gnu_cxx::__per_type_pool_policy pool_t; -typedef __gnu_cxx::__mt_alloc allocator_t; -typedef std::basic_string string_t; - -int main() -{ - bool test __attribute__((unused)) = true; - { - string_t s; - s += "bayou bend"; - } - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc new file mode 100644 index 0000000..5664d3c --- /dev/null +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc @@ -0,0 +1,78 @@ +// +// Copyright (C) 2004 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 20.4.1.1 allocator members + +#include +#include +#include +#include + +static size_t count; + +struct count_check +{ + count_check() {} + ~count_check() + { + if (count != 0) + throw std::runtime_error("count isn't zero"); + } +}; + +static count_check check; + +void* operator new(size_t size) throw(std::bad_alloc) +{ + printf("operator new is called \n"); + void* p = malloc(size); + if (p == NULL) + throw std::bad_alloc(); + count++; + return p; +} + +void operator delete(void* p) throw() +{ + printf("operator delete is called \n"); + if (p == NULL) + return; + count--; + if (count == 0) + printf("All memory released \n"); + else + printf("%u allocations to be released \n", count); + free(p); +} + +typedef char char_t; +typedef std::char_traits traits_t; +typedef __gnu_cxx::__common_pool_policy pool_t; +typedef __gnu_cxx::__mt_alloc allocator_t; +typedef std::basic_string string_t; + +int main() +{ + bool test __attribute__((unused)) = true; + { + string_t s; + s += "bayou bend"; + } + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc new file mode 100644 index 0000000..973f758 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc @@ -0,0 +1,78 @@ +// +// Copyright (C) 2004 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 20.4.1.1 allocator members + +#include +#include +#include +#include + +static size_t count; + +struct count_check +{ + count_check() {} + ~count_check() + { + if (count != 0) + throw std::runtime_error("count isn't zero"); + } +}; + +static count_check check; + +void* operator new(size_t size) throw(std::bad_alloc) +{ + printf("operator new is called \n"); + void* p = malloc(size); + if (p == NULL) + throw std::bad_alloc(); + count++; + return p; +} + +void operator delete(void* p) throw() +{ + printf("operator delete is called \n"); + if (p == NULL) + return; + count--; + if (count == 0) + printf("All memory released \n"); + else + printf("%u allocations to be released \n", count); + free(p); +} + +typedef char char_t; +typedef std::char_traits traits_t; +typedef __gnu_cxx::__per_type_pool_policy pool_t; +typedef __gnu_cxx::__mt_alloc allocator_t; +typedef std::basic_string string_t; + +int main() +{ + bool test __attribute__((unused)) = true; + { + string_t s; + s += "bayou bend"; + } + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc b/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc index 579b8bc..4fa49aa 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc @@ -27,7 +27,9 @@ using namespace __gnu_cxx; template class __mt_alloc; -template class __mt_alloc >; template class __mt_alloc >; -template class __mt_alloc >; template class __mt_alloc >; +#ifdef __GTHREADS +template class __mt_alloc >; +template class __mt_alloc >; +#endif diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc index 1b225f2..26d198a 100644 --- a/libstdc++-v3/testsuite/thread/pthread1.cc +++ b/libstdc++-v3/testsuite/thread/pthread1.cc @@ -34,7 +34,6 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS using namespace std; const int thread_cycles = 10; @@ -135,6 +134,3 @@ main () return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc index 7fbdfc0..7a0efd0 100644 --- a/libstdc++-v3/testsuite/thread/pthread2.cc +++ b/libstdc++-v3/testsuite/thread/pthread2.cc @@ -28,8 +28,6 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 2; const int max_loop_count = 1000000; @@ -62,6 +60,3 @@ main() return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc index ca8f771..4696fb7 100644 --- a/libstdc++-v3/testsuite/thread/pthread3.cc +++ b/libstdc++-v3/testsuite/thread/pthread3.cc @@ -28,8 +28,6 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 2; const int max_loop_count = 1000000; @@ -59,6 +57,3 @@ main() return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc index be1ae68..a9ec9b8 100644 --- a/libstdc++-v3/testsuite/thread/pthread4.cc +++ b/libstdc++-v3/testsuite/thread/pthread4.cc @@ -30,7 +30,6 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS using namespace std; static list foo; @@ -113,6 +112,3 @@ main (void) return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc index b950542..93f03a2 100644 --- a/libstdc++-v3/testsuite/thread/pthread5.cc +++ b/libstdc++-v3/testsuite/thread/pthread5.cc @@ -31,7 +31,6 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS #ifdef _GLIBCXX_HAVE_UNISTD_H #include // To test for _POSIX_THREAD_PRIORITY_SCHEDULING #endif @@ -130,6 +129,3 @@ main () return (0); } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc index e0fee71..ba8c341 100644 --- a/libstdc++-v3/testsuite/thread/pthread6.cc +++ b/libstdc++-v3/testsuite/thread/pthread6.cc @@ -30,8 +30,6 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 8; const int loops = 100000; @@ -94,6 +92,3 @@ main (void) return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc index 2f40134..307973c 100644 --- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc @@ -29,13 +29,12 @@ // Do not include explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 4; const int max_loop_count = 10000; -__gnu_cxx::crope foo2; -__gnu_cxx::crope foo4; +typedef __gnu_cxx::rope > rope_type; +rope_type foo2; +rope_type foo4; void* thread_main(void *) { @@ -73,7 +72,7 @@ main() pthread_setconcurrency (max_thread_count); #endif - __gnu_cxx::crope foo; + rope_type foo; foo += "bar"; foo += "baz"; foo += "bongle"; @@ -89,7 +88,7 @@ main() VERIFY( !std::strcmp (data2, "bar2baz2bongle2") ); } - __gnu_cxx::crope foo3 ("hello"); + rope_type foo3 ("hello"); const char* data3 = foo3.c_str(); VERIFY( !std::strcmp (data3, "hello") ); @@ -112,6 +111,3 @@ main() return 0; } -#else -int main (void) {} -#endif -- cgit v1.1