]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/28080 (header dependencies)
authorPaolo Carlini <pcarlini@suse.de>
Fri, 2 Mar 2007 16:21:30 +0000 (16:21 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 2 Mar 2007 16:21:30 +0000 (16:21 +0000)
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.

2007-03-02  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/28080 (partial)
* include/tr1/random (class random_device): Rework to use simple
<cstdio> input, do not include <fstream>.
* include/tr1/random.tcc (all inserters and extractors): Refer
to ios_base as base class of basic_istream or basic_ostream.

From-SVN: r122478

libstdc++-v3/ChangeLog
libstdc++-v3/include/tr1/random
libstdc++-v3/include/tr1/random.tcc
libstdc++-v3/testsuite/thread/pthread1.cc
libstdc++-v3/testsuite/thread/pthread2.cc
libstdc++-v3/testsuite/thread/pthread3.cc
libstdc++-v3/testsuite/thread/pthread4.cc
libstdc++-v3/testsuite/thread/pthread5.cc
libstdc++-v3/testsuite/thread/pthread6.cc
libstdc++-v3/testsuite/thread/pthread7-rope.cc

index d025ca005d8d5cdeb5baf115725934d258519938..e43a953324538242371110234928a844b5d7bdb2 100644 (file)
@@ -1,3 +1,21 @@
+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.
+
+2007-03-02  Paolo Carlini  <pcarlini@suse.de>
+
+       PR libstdc++/28080 (partial)
+       * include/tr1/random (class random_device): Rework to use simple
+       <cstdio> input, do not include <fstream>.
+       * include/tr1/random.tcc (all inserters and extractors): Refer
+       to ios_base as base class of basic_istream or basic_ostream.
+
 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
 
        * Makefile.am: Add dummy install-pdf target.
index 02a7ae7bc858b9bf48534ac33e1229ad73e4b2e1..e8483c7efb9ebcd7daf54976d75ddc42a7619cb9 100644 (file)
 #ifndef _TR1_RANDOM
 #define _TR1_RANDOM 1
 
-#include <bits/stl_algobase.h>
-#include <bits/concept_check.h>
 #include <cmath>
-#include <debug/debug.h>
-#include <iterator>
+#include <cstdio>
+#include <string>
 #include <iosfwd>
 #include <limits>
 #include <tr1/type_traits>
 #include <tr1/cmath>
-#include <fstream>
 #include <ext/type_traits.h>
+#include <bits/concept_check.h>
+#include <debug/debug.h>
 
 namespace std
 {
@@ -1421,14 +1420,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     random_device(const std::string& __token = "/dev/urandom")
     {
       if ((__token != "/dev/urandom" && __token != "/dev/random")
-         || !_M_filebuf.open(__token.c_str(),
-                             std::ios_base::in | std::ios_base::binary))
+         || !(_M_file = std::fopen(__token.c_str(), "rb")))
        std::__throw_runtime_error(__N("random_device::"
                                       "random_device(const std::string&)"));
     }
 
     ~random_device()
-    { _M_filebuf.close(); }
+    { std::fclose(_M_file); }
 
 #else
 
@@ -1474,7 +1472,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     {
 #ifdef _GLIBCXX_USE_RANDOM_TR1
       result_type __ret;
-      _M_filebuf.sgetn(reinterpret_cast<char*>(&__ret), sizeof(result_type));
+      std::fread(reinterpret_cast<void*>(&__ret), sizeof(result_type),
+                1, _M_file);
       return __ret;
 #else
       return _M_mt();
@@ -1486,7 +1485,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     void operator=(const random_device&);
 
 #ifdef _GLIBCXX_USE_RANDOM_TR1
-    std::filebuf _M_filebuf;
+    FILE*        _M_file;
 #else
     mt19937      _M_mt;
 #endif
index c66a4d8f17b6b7b9eefa71a264a130646823cfa4..3962816c8cef94ccb1f347b47564546238c85996 100644 (file)
@@ -1,6 +1,6 @@
 // random number generation (out of line) -*- C++ -*-
 
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -143,10 +143,12 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const linear_congruential<_UIntType, __a, __c, __m>& __lcr)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
-      __os.flags(std::ios_base::dec | std::ios_base::fixed
-                | std::ios_base::left);
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
       __os.fill(__os.widen(' '));
 
       __os << __lcr._M_x;
@@ -162,8 +164,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               linear_congruential<_UIntType, __a, __c, __m>& __lcr)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec);
 
       __is >> __lcr._M_x;
 
@@ -268,11 +273,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
               const mersenne_twister<_UIntType, __w, __n, __m,
               __r, __a, __u, __s, __b, __t, __c, __l>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::dec | std::ios_base::fixed
-                | std::ios_base::left);
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
       __os.fill(__space);
 
       for (int __i = 0; __i < __n - 1; ++__i)
@@ -293,8 +300,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
               mersenne_twister<_UIntType, __w, __n, __m,
               __r, __a, __u, __s, __b, __t, __c, __l>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       for (int __i = 0; __i < __n; ++__i)
        __is >> __x._M_x[__i];
@@ -385,11 +395,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const subtract_with_carry<_IntType, __m, __s, __r>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::dec | std::ios_base::fixed
-                | std::ios_base::left);
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
       __os.fill(__space);
 
       for (int __i = 0; __i < __r; ++__i)
@@ -407,8 +419,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               subtract_with_carry<_IntType, __m, __s, __r>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_ostream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       for (int __i = 0; __i < __r; ++__i)
        __is >> __x._M_x[__i];
@@ -524,11 +539,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const subtract_with_carry_01<_RealType, __w, __s, __r>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::dec | std::ios_base::fixed
-                | std::ios_base::left);
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
       __os.fill(__space);
 
       for (int __i = 0; __i < __r; ++__i)
@@ -547,8 +564,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               subtract_with_carry_01<_RealType, __w, __s, __r>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       for (int __i = 0; __i < __r; ++__i)
        for (int __j = 0; __j < __x.__n; ++__j)
@@ -586,11 +606,14 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
               const discard_block<_UniformRandomNumberGenerator,
               __p, __r>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::dec | std::ios_base::fixed
-                | std::ios_base::left);
+      __os.flags(__ios_base::dec | __ios_base::fixed
+                | __ios_base::left);
       __os.fill(__space);
 
       __os << __x._M_b << __space << __x._M_n;
@@ -606,8 +629,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               discard_block<_UniformRandomNumberGenerator, __p, __r>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       __is >> __x._M_b >> __x._M_n;
 
@@ -686,11 +712,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
               const xor_combine<_UniformRandomNumberGenerator1, __s1,
               _UniformRandomNumberGenerator2, __s2>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::dec | std::ios_base::fixed 
-                | std::ios_base::left);
+      __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
       __os.fill(__space);
 
       __os << __x.base1() << __space << __x.base2();
@@ -708,8 +736,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
               xor_combine<_UniformRandomNumberGenerator1, __s1,
               _UniformRandomNumberGenerator2, __s2>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
 
       __is >> __x._M_b1 >> __x._M_b2;
 
@@ -723,10 +754,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const uniform_int<_IntType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__space);
 
       __os << __x.min() << __space << __x.max();
@@ -741,8 +775,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               uniform_int<_IntType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       __is >> __x._M_min >> __x._M_max;
 
@@ -756,10 +793,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const bernoulli_distribution& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__os.widen(' '));
       __os.precision(__gnu_cxx::__numeric_traits<double>::__max_digits10);
 
@@ -800,10 +840,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const geometric_distribution<_IntType, _RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__os.widen(' '));
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
@@ -960,11 +1003,14 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const poisson_distribution<_IntType, _RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__space);
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
@@ -982,8 +1028,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               poisson_distribution<_IntType, _RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
 
       __is >> __x._M_mean >> __x._M_nd;
       __x._M_initialize();
@@ -1192,11 +1241,14 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const binomial_distribution<_IntType, _RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__space);
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
@@ -1215,8 +1267,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               binomial_distribution<_IntType, _RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       __is >> __x._M_t >> __x._M_p >> __x._M_nd;
       __x._M_initialize();
@@ -1231,11 +1286,14 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const uniform_real<_RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__space);
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
@@ -1252,8 +1310,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               uniform_real<_RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::skipws);
 
       __is >> __x._M_min >> __x._M_max;
 
@@ -1267,10 +1328,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const exponential_distribution<_RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__os.widen(' '));
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
@@ -1328,11 +1392,14 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const normal_distribution<_RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
       const _CharT __space = __os.widen(' ');
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__space);
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
@@ -1353,8 +1420,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator>>(std::basic_istream<_CharT, _Traits>& __is,
               normal_distribution<_RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __is.flags();
-      __is.flags(std::ios_base::dec | std::ios_base::skipws);
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __is.flags();
+      __is.flags(__ios_base::dec | __ios_base::skipws);
 
       __is >> __x._M_saved_available >> __x._M_mean
           >> __x._M_sigma;
@@ -1455,10 +1525,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
               const gamma_distribution<_RealType>& __x)
     {
-      const std::ios_base::fmtflags __flags = __os.flags();
+      typedef std::basic_ostream<_CharT, _Traits>  __ostream_type;
+      typedef typename __ostream_type::ios_base    __ios_base;
+
+      const typename __ios_base::fmtflags __flags = __os.flags();
       const _CharT __fill = __os.fill();
       const std::streamsize __precision = __os.precision();
-      __os.flags(std::ios_base::scientific | std::ios_base::left);
+      __os.flags(__ios_base::scientific | __ios_base::left);
       __os.fill(__os.widen(' '));
       __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
 
index d9ba9b16a96273545b31aeb0fc5a64a95838267b..f66c3c9e8467034f60b1437918f00d5703652521 100644 (file)
@@ -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,9 +31,7 @@
 // if the STL threading support is fubar'd).
 
 #include <list>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
+#include <pthread.h>
 
 using namespace std;
 
index 9fffd284fe1c1f7b49d51ba87c69f5d66a34b224..73a3da596dfb9566c2b721526de36af551e4b374 100644 (file)
@@ -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,9 +25,7 @@
 // { dg-options "-pthreads" { target *-*-solaris* } }
 
 #include <fstream>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
+#include <pthread.h>
 
 const int max_thread_count = 2;
 const int max_loop_count = 1000000;
index a0e340caf7d4476abf8d1ee1d492f2fd3de1067f..740c9098b6906957193c48f30ed8fa59c1a8f826 100644 (file)
@@ -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,9 +25,7 @@
 // { dg-options "-pthreads" { target *-*-solaris* } }
 
 #include <sstream>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
+#include <pthread.h>
 
 const int max_thread_count = 2;
 const int max_loop_count = 1000000;
index a4b520d73e408b5a1850d769a3a634aa29786c04..f910f9c40b5ccc5856b4f427cfd94b55a4af1ebb 100644 (file)
@@ -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,9 +27,7 @@
 
 #include <string>
 #include <list>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
+#include <pthread.h>
 
 using namespace std;
 
index 189c8a5c15324c570d47d8deacef7137ba06545e..4d5aac4365b460031883158432eb9ea0546b5736 100644 (file)
@@ -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,9 +28,7 @@
 #include <vector>
 #include <list>
 #include <string>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
+#include <pthread.h>
 
 #ifdef _GLIBCXX_HAVE_UNISTD_H
 #include <unistd.h>    // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
index 75d49e211a8ff2eb48d050ec3c5c1014005b1260..64b7a3d5318a9c9fbab9644d6b05d520d94d5eb1 100644 (file)
@@ -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,9 +27,7 @@
 #include <string>
 #include <map>
 #include <vector>
-
-// Do not include <pthread.h> explicitly; if threads are properly
-// configured for the port, then it is picked up free from STL headers.
+#include <pthread.h>
 
 const int max_thread_count = 8;
 const int loops = 100000;
index c09ab4564d08ab393f7d3653c7bef40fba430a1f..323366572fa60422b773d322718e1f94c3e1d17b 100644 (file)
@@ -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
 
 #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;