diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0ddd1a52fa6ae4a3e666a93544177004c35b5348..576318f0e43897b3327a8a237a6f81b35f788513 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,14 @@
+2005-02-18  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+	* testsuite/thread/pthread1.cc: Do not invoke pthread_setconcurrency
+	on Solaris 2.6 and below.
+	* 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.
+
 2005-02-17  Matt Austern  <austern@apple.com>
 
 	* include/tr1/functional (hash): New function object.
diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc
index 26d198a755e937fb23b4430236edfc238897ddf0..f83e20595af7fd6434f32d6788f31a3cfd46220a 100644
--- a/libstdc++-v3/testsuite/thread/pthread1.cc
+++ b/libstdc++-v3/testsuite/thread/pthread1.cc
@@ -111,7 +111,7 @@ main ()
 
   task_queue* tq[thread_pairs];
 
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (thread_pairs * 2);
 #endif
 
diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc
index 7a0efd067a21ed1aaa0ffd0c9fbed6ea9d8c4a46..84485165cd27d0236b69c35087ac91f8abfca43e 100644
--- a/libstdc++-v3/testsuite/thread/pthread2.cc
+++ b/libstdc++-v3/testsuite/thread/pthread2.cc
@@ -48,7 +48,7 @@ main()
 {
   pthread_t tid[max_thread_count];
 
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (max_thread_count);
 #endif
 
diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc
index 4696fb76cdc0301c475cf811351f83660c369ccd..23f4e04e180219f80291454425321b0cde6c18b7 100644
--- a/libstdc++-v3/testsuite/thread/pthread3.cc
+++ b/libstdc++-v3/testsuite/thread/pthread3.cc
@@ -45,7 +45,7 @@ main()
 {
   pthread_t tid[max_thread_count];
 
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (max_thread_count);
 #endif
 
diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc
index a9ec9b84e3878b6a5b2524b42f61b813d691115a..b58445fb68eae9531606ffffc1773e714dde1a06 100644
--- a/libstdc++-v3/testsuite/thread/pthread4.cc
+++ b/libstdc++-v3/testsuite/thread/pthread4.cc
@@ -98,7 +98,7 @@ template class __gnu_cxx::__mt_alloc<std::_List_node<std::string> >;
 int
 main (void)
 {
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (2);
 #endif
 
diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc
index 93f03a227615c717747f712cda18f7e084d84be1..30086d4584d6e9492d1176db99c8aa31d1c54417 100644
--- a/libstdc++-v3/testsuite/thread/pthread5.cc
+++ b/libstdc++-v3/testsuite/thread/pthread5.cc
@@ -100,7 +100,7 @@ main ()
   int ids[NTHREADS];
   void* status;
 
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (NTHREADS);
 #endif
 
diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc
index ba8c341c3f8d150877e6e58bc796043a53370897..44b2b8971467d7375f8d1c07b710e573e3d6c063 100644
--- a/libstdc++-v3/testsuite/thread/pthread6.cc
+++ b/libstdc++-v3/testsuite/thread/pthread6.cc
@@ -80,7 +80,7 @@ main (void)
 {
   pthread_t tid[max_thread_count];
 
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (max_thread_count);
 #endif
 
diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
index 307973c202db7ed930931cdc788a8b92a08b3939..3f5a338d08668e037322bba70a65370d39f52347 100644
--- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc
+++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
@@ -68,7 +68,7 @@ main()
 
   pthread_t tid[max_thread_count];
 
-#if defined(__sun) && defined(__svr4__)
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
   pthread_setconcurrency (max_thread_count);
 #endif