This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFA/Patch] One more for libstdc++/28080
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 02 Mar 2007 01:22:15 +0100
- Subject: [RFA/Patch] One more for libstdc++/28080
Hi,
in order to make more substantive progress (really, probably my last one
for a while), I have in testing another batch of changes which start
actually reducing noticeably the size of the pre-proprocessed <memory>
(as requested in the original PR), all the containers, <algorithm>. The
idea is that normally (outside debug mode) we don't want for such
facilities to end up including <iosfwd> (and therefore <bits/gthr.h>)
which is remarkably big and has no actual uses in the implementation. If
we agree about that, then I would commit as a preparatory step the
below, say tomorrow evening, and then real soon will post the real patch
for final review. (Note that we are already including explicitely
<pthread.h> in many other tests, as should be always the case, in my
opinion).
Paolo.
////////////////////
2007-03-02 Paolo Carlini <pcarlini@suse.de>
* testsuite/thread/pthread1.cc: Include <pthread.h>.
* testsuite/thread/pthread2.cc: Likewise.
* testsuite/thread/pthread3.cc: Likewise.
* testsuite/thread/pthread4.cc: Likewise.
* testsuite/thread/pthread5.cc: Likewise.
* testsuite/thread/pthread6.cc: Likewise.
* testsuite/thread/pthread7-rope.cc: Likewise.
Index: testsuite/thread/pthread4.cc
===================================================================
--- testsuite/thread/pthread4.cc (revision 122403)
+++ testsuite/thread/pthread4.cc (working copy)
@@ -2,7 +2,8 @@
// Adapted from http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html
// which was adapted from pthread1.cc by Mike Lu <MLu@dynamicsoft.com>
//
-// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+// 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
@@ -26,10 +27,8 @@
#include <string>
#include <list>
+#include <pthread.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
using namespace std;
static list<string> foo;
Index: testsuite/thread/pthread5.cc
===================================================================
--- testsuite/thread/pthread5.cc (revision 122403)
+++ testsuite/thread/pthread5.cc (working copy)
@@ -2,7 +2,8 @@
// Adpated from libstdc++/5464 submitted by jjessel@amadeus.net
// Jean-Francois JESSEL (Amadeus SAS Development)
//
-// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+// 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
@@ -27,10 +28,8 @@
#include <vector>
#include <list>
#include <string>
+#include <pthread.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
#ifdef _GLIBCXX_HAVE_UNISTD_H
#include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
#endif
Index: testsuite/thread/pthread6.cc
===================================================================
--- testsuite/thread/pthread6.cc (revision 122403)
+++ testsuite/thread/pthread6.cc (working copy)
@@ -1,7 +1,8 @@
// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
// Adpated from libstdc++/5444 submitted by markus.breuer@materna.de
//
-// Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+// 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
@@ -26,10 +27,8 @@
#include <string>
#include <map>
#include <vector>
+#include <pthread.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
const int max_thread_count = 8;
const int loops = 100000;
Index: testsuite/thread/pthread7-rope.cc
===================================================================
--- testsuite/thread/pthread7-rope.cc (revision 122403)
+++ testsuite/thread/pthread7-rope.cc (working copy)
@@ -1,6 +1,6 @@
// 2003-05-03 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
//
-// Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2004, 2005, 2006, 2007 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
@@ -24,11 +24,9 @@
#include <ext/rope>
#include <cstring>
+#include <pthread.h>
#include <testsuite_hooks.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
const int max_thread_count = 4;
const int max_loop_count = 10000;
Index: testsuite/thread/pthread1.cc
===================================================================
--- testsuite/thread/pthread1.cc (revision 122411)
+++ testsuite/thread/pthread1.cc (working copy)
@@ -1,6 +1,7 @@
// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
//
-// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+// 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
@@ -30,10 +31,8 @@
// if the STL threading support is fubar'd).
#include <list>
+#include <pthread.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
using namespace std;
const int thread_cycles = 10;
Index: testsuite/thread/pthread2.cc
===================================================================
--- testsuite/thread/pthread2.cc (revision 122403)
+++ testsuite/thread/pthread2.cc (working copy)
@@ -1,7 +1,8 @@
// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
// Adpated from libstdc++/5347 submitted by markus.breuer@materna.de
//
-// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+// 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
@@ -24,10 +25,8 @@
// { dg-options "-pthreads" { target *-*-solaris* } }
#include <fstream>
+#include <pthread.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
const int max_thread_count = 2;
const int max_loop_count = 1000000;
Index: testsuite/thread/pthread3.cc
===================================================================
--- testsuite/thread/pthread3.cc (revision 122403)
+++ testsuite/thread/pthread3.cc (working copy)
@@ -1,7 +1,8 @@
// 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
// Adpated from libstdc++/5347 submitted by markus.breuer@materna.de
//
-// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+// 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
@@ -24,10 +25,8 @@
// { dg-options "-pthreads" { target *-*-solaris* } }
#include <sstream>
+#include <pthread.h>
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
-
const int max_thread_count = 2;
const int max_loop_count = 1000000;