This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Fix testsuite_shared.cc vs --enable-threads=single


Hi,

while doing some experiments, I noticed that testsuite_shared.cc doesn't build at all together with --enable-threads=single, thus, the testsuite cannot be run, even if in that case the facilities in testsuite_shared.cc are not used. I fixed the issue with the below, which means automatically using __common_pool_policy<__gnu_cxx::__pool, false> in that case.

Unless Benjamin doesn't have in mind something more sophisticated (maybe together with the testsuite utils project), I'm going to install it, for now.

Tested x86-linux.

Paolo.

/////////////
2006-05-22  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/testsuite_shared.cc: Fix --enable-threads=single build.
Index: testsuite/testsuite_shared.cc
===================================================================
--- testsuite/testsuite_shared.cc	(revision 113915)
+++ testsuite/testsuite_shared.cc	(working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006 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
@@ -28,8 +28,7 @@
 {
   typedef char value_t;
 
-  typedef __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> policy_t;
-  typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
+  typedef __gnu_cxx::__mt_alloc<value_t> allocator_t;
 
   typedef std::char_traits<value_t> traits_t; 
   typedef std::basic_string<value_t, traits_t, allocator_t> string_t;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]