+2004-10-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * 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 <bkoz@redhat.com>
Paolo Carlini <pcarlini@suse.de>
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@
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
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)
])
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
# include <unistd.h>
#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.
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
+
# Propagate the target-specific source directories through the build chain.
ATOMICITY_SRCDIR=config/${atomicity_dir}
ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
+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='#'
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
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
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@
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@
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@
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@
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
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@
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
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 = \
# 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*
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@
# 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
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
using namespace __gnu_cxx;
template class __mt_alloc<int>;
-template class __mt_alloc<short, __common_pool_policy<true> >;
template class __mt_alloc<short, __common_pool_policy<false> >;
-template class __mt_alloc<short, __per_type_pool_policy<short, true> >;
template class __mt_alloc<short, __per_type_pool_policy<short, false> >;
+#ifdef __GTHREADS
+template class __mt_alloc<short, __common_pool_policy<true> >;
+template class __mt_alloc<short, __per_type_pool_policy<short, true> >;
+#endif
// Do not include <pthread.h> 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;
return 0;
}
-#else
-int main (void) {}
-#endif
// Do not include <pthread.h> 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;
return 0;
}
-#else
-int main (void) {}
-#endif
// Do not include <pthread.h> 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;
return 0;
}
-#else
-int main (void) {}
-#endif
// Do not include <pthread.h> 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<string> foo;
return 0;
}
-#else
-int main (void) {}
-#endif
// Do not include <pthread.h> 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 <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
#endif
return (0);
}
-#else
-int main (void) {}
-#endif
// Do not include <pthread.h> 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;
return 0;
}
-#else
-int main (void) {}
-#endif
// Do not include <pthread.h> 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<char, std::allocator<char> > rope_type;
+rope_type foo2;
+rope_type foo4;
void* thread_main(void *)
{
pthread_setconcurrency (max_thread_count);
#endif
- __gnu_cxx::crope foo;
+ rope_type foo;
foo += "bar";
foo += "baz";
foo += "bongle";
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") );
return 0;
}
-#else
-int main (void) {}
-#endif