OSDN Git Service

* testsuite/thread/pthread1.cc: Remove special case for FreeBSD.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / thread / pthread1.cc
index 5d81563..2ea52ca 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-01-23  Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org>
 //
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003 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
@@ -18,7 +18,7 @@
 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 // USA.
 
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin } }
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } }
 // { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } }
 // { dg-options "-pthreads" { target *-*-solaris* } }
 
@@ -124,14 +124,6 @@ main (int argc, char** argv)
        {
          pthread_join (prod[i], NULL);
          pthread_join (cons[i], NULL);
-#if defined(__FreeBSD__) && __FreeBSD__ < 5
-         // These lines are not required by POSIX since a successful
-         // join is suppose to detach as well...
-         pthread_detach (prod[i]);
-         pthread_detach (cons[i]);
-         // ...but they are according to the FreeBSD 4.X code base
-         // or else you get a memory leak.
-#endif
          delete tq[i];
        }
     }