Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2012 01:48:26 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229551 - in stable/9/contrib/libstdc++: . config/os/aix include/bits include/ext include/tr1 libsupc++ src
Message-ID:  <201201050148.q051mQl5008914@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Thu Jan  5 01:48:25 2012
New Revision: 229551
URL: http://svn.freebsd.org/changeset/base/229551

Log:
  MFC:	r228780
  
  Update libstdc++ with small changes up to the latest rev. (135556)
  from the gcc 4.2 branch.
  The libraries in the gcc-4_2-branch remained under the LGPLv2.
  
  Reviewed by:	mm
  Approved by:	jhb (mentor)

Modified:
  stable/9/contrib/libstdc++/ChangeLog
  stable/9/contrib/libstdc++/config/os/aix/os_defines.h
  stable/9/contrib/libstdc++/include/bits/allocator.h
  stable/9/contrib/libstdc++/include/bits/basic_string.h
  stable/9/contrib/libstdc++/include/bits/fstream.tcc
  stable/9/contrib/libstdc++/include/bits/locale_facets.tcc
  stable/9/contrib/libstdc++/include/ext/atomicity.h
  stable/9/contrib/libstdc++/include/ext/codecvt_specializations.h
  stable/9/contrib/libstdc++/include/ext/concurrence.h
  stable/9/contrib/libstdc++/include/ext/vstring.h
  stable/9/contrib/libstdc++/include/tr1/boost_shared_ptr.h
  stable/9/contrib/libstdc++/include/tr1/random
  stable/9/contrib/libstdc++/libsupc++/eh_personality.cc
  stable/9/contrib/libstdc++/libsupc++/typeinfo
  stable/9/contrib/libstdc++/src/valarray-inst.cc
Directory Properties:
  stable/9/contrib/libstdc++/   (props changed)

Modified: stable/9/contrib/libstdc++/ChangeLog
==============================================================================
--- stable/9/contrib/libstdc++/ChangeLog	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/ChangeLog	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1,3 +1,133 @@
+2008-05-19  Release Manager
+
+	* GCC 4.2.4 released.
+
+2008-03-13  David Edelsohn  <edelsohn@gnu.org>
+
+	Backport from mainline:
+	2008-01-26  David Edelsohn  <edelsohn@gnu.org>
+
+        PR target/34794
+        * config/os/aix/os_defines.h: Define __COMPATMATH__.
+
+2008-02-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* testsuite/27_io/fpos/14320-1.cc: Check for "long long" and
+	remove XFAIL.
+
+2008-02-01  Release Manager
+
+	* GCC 4.2.3 released.
+
+2008-01-06  Ted Phelps  <phelps@gnusto.com>
+
+	PR c++/34152
+	* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check
+	_GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO.
+
+2008-01-05  Paolo Carlini  <pcarlini@suse.de>
+
+	PR libstdc++/34680
+
+	Revert:
+	2007-12-17  Jonathan Wakely  <jwakely.gcc@gmail.com>
+	* include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
+	RTTI checks.
+
+	2007-12-14  Benjamin Kosnik  <bkoz@redhat.com>
+
+        PR libstdc++/30127
+        PR libstdc++/34449
+        * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
+        (has_facet): Same.
+        * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
+        * testsuite/22_locale/global_templates/
+        standard_facet_hierarchies.cc: New.
+
+2007-12-17  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
+	RTTI checks.
+
+2007-12-17  Benjamin Kosnik  <bkoz@redhat.com>
+
+	* testsuite/22_locale/global_templates/
+	standard_facet_hierarchies.cc: Fix for generic locale model.
+
+2007-12-14  Benjamin Kosnik  <bkoz@redhat.com>
+
+        PR libstdc++/30127
+        PR libstdc++/34449
+        * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
+        (has_facet): Same.
+        * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
+        * testsuite/22_locale/global_templates/
+        standard_facet_hierarchies.cc: New.
+
+2007-11-26  Paolo Carlini  <pcarlini@suse.de>
+
+	* include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When
+	ios_base::showpos and the type is signed and the value is zero,
+	prepend +.
+	* testsuite/22_locale/num_put/put/char/12.cc: New.
+	* testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise.
+
+2007-10-20  Paolo Carlini  <pcarlini@suse.de>
+
+	* include/tr1/random
+	(uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
+	result_type, true_type)): Fix small thinko.
+
+2007-10-19  Paolo Carlini  <pcarlini@suse.de>
+
+	PR libstdc++/33815
+	* include/tr1/random
+	(uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
+	result_type, true_type)): Avoid the modulo (which uses the low-order
+	bits).
+
+2007-10-18  Paolo Carlini  <pcarlini@suse.de>
+
+	PR libstdc++/33807
+	* include/bits/allocator.h (operator==(const allocator<_Tp>&,
+	const allocator<_Tp>&), operator!=(const allocator<_Tp>&,
+	const allocator<_Tp>&)): Add.
+	* testsuite/20_util/memory/allocator/33807.cc: New.
+	
+2007-10-14  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* docs/html/Makefile: Follow up to libstdc++/14991, remove target.
+
+2007-10-14  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* src/valarray-inst.cc, include/ext/atomicity.h,
+	include/ext/concurrence.h, include/bits/basic_string.h,
+	include/bits/fstream.tcc, include/ext/vstring.h: Fix comment typos.
+
+2007-10-14  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* include/tr1_impl/boost_shared_ptr.h: (__weak_ptr::lock()): Add
+	missing template argument.
+	* testsuite/tr1/2_general_utilities/memory/shared_ptr/
+	explicit_instantiation/2.cc: New.
+	* testsuite/tr1/2_general_utilities/memory/weak_ptr/
+	explicit_instantiation/2.cc: New.
+
+2007-10-11  Paolo Carlini  <pcarlini@suse.de>
+
+	PR libstdc++/33734
+	* include/ext/codecvt_specializations.h (encoding_state::good,
+	init, destroy): Use cast notation instead of reinterpret_cast.
+
+2007-10-07  Release Manager
+
+	* GCC 4.2.2 released.
+
+2007-10-06  Benjamin Kosnik  <bkoz@redhat.com>
+
+	PR libstdc++/33678	
+	* libsupc++/typeinfo (typeinfo): Revert ordering of virtual components.
+
 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
 
 	PR libstdc++/33128

Modified: stable/9/contrib/libstdc++/config/os/aix/os_defines.h
==============================================================================
--- stable/9/contrib/libstdc++/config/os/aix/os_defines.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/config/os/aix/os_defines.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1,6 +1,6 @@
 // Specific definitions for AIX  -*- C++ -*-
 
-// Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2005, 2008 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
@@ -48,4 +48,9 @@
 #define _ALL_SOURCE
 #endif
 
+// C99 math
+#ifndef __COMPATMATH__
+#define __COMPATMATH__
+#endif
+
 #endif

Modified: stable/9/contrib/libstdc++/include/bits/allocator.h
==============================================================================
--- stable/9/contrib/libstdc++/include/bits/allocator.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/bits/allocator.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -115,11 +115,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     operator==(const allocator<_T1>&, const allocator<_T2>&)
     { return true; }
 
+  template<typename _Tp>
+    inline bool
+    operator==(const allocator<_Tp>&, const allocator<_Tp>&)
+    { return true; }
+
   template<typename _T1, typename _T2>
     inline bool
     operator!=(const allocator<_T1>&, const allocator<_T2>&)
     { return false; }
 
+  template<typename _Tp>
+    inline bool
+    operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
+    { return false; }
+
   // Inhibit implicit instantiations for required instantiations,
   // which are defined via explicit instantiations elsewhere.
   // NB: This syntax is a GNU extension.

Modified: stable/9/contrib/libstdc++/include/bits/basic_string.h
==============================================================================
--- stable/9/contrib/libstdc++/include/bits/basic_string.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/bits/basic_string.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1672,7 +1672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find position of a character of C substring.
        *  @param s  String containing characters to locate.
-       *  @param pos  Index of character to search from (default 0).
+       *  @param pos  Index of character to search from.
        *  @param n  Number of characters from s to search for.
        *  @return  Index of first occurrence.
        *
@@ -1733,7 +1733,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find last position of a character of C substring.
        *  @param s  C string containing characters to locate.
-       *  @param pos  Index of character to search back from (default end).
+       *  @param pos  Index of character to search back from.
        *  @param n  Number of characters from s to search for.
        *  @return  Index of last occurrence.
        *
@@ -1764,7 +1764,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find last position of a character.
        *  @param c  Character to locate.
-       *  @param pos  Index of character to search back from (default 0).
+       *  @param pos  Index of character to search back from (default end).
        *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for @a c within this string.
@@ -1794,7 +1794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find position of a character not in C substring.
        *  @param s  C string containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
+       *  @param pos  Index of character to search from.
        *  @param n  Number of characters from s to consider.
        *  @return  Index of first occurrence.
        *
@@ -1839,8 +1839,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find last position of a character not in string.
        *  @param str  String containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
-       *  @return  Index of first occurrence.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character not
        *  contained in @a str within this string.  If found, returns the index
@@ -1853,9 +1853,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find last position of a character not in C substring.
        *  @param s  C string containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
+       *  @param pos  Index of character to search back from.
        *  @param n  Number of characters from s to consider.
-       *  @return  Index of first occurrence.
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character not
        *  contained in the first @a n characters of @a s within this string.
@@ -1866,10 +1866,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       find_last_not_of(const _CharT* __s, size_type __pos,
 		       size_type __n) const;
       /**
-       *  @brief  Find position of a character not in C string.
+       *  @brief  Find last position of a character not in C string.
        *  @param s  C string containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
-       *  @return  Index of first occurrence.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character not
        *  contained in @a s within this string.  If found, returns the index
@@ -1885,8 +1885,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /**
        *  @brief  Find last position of a different character.
        *  @param c  Character to avoid.
-       *  @param pos  Index of character to search from (default 0).
-       *  @return  Index of first occurrence.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character other than
        *  @a c within this string.  If found, returns the index where it was

Modified: stable/9/contrib/libstdc++/include/bits/fstream.tcc
==============================================================================
--- stable/9/contrib/libstdc++/include/bits/fstream.tcc	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/bits/fstream.tcc	Thu Jan  5 01:48:25 2012	(r229551)
@@ -194,7 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       const bool __testin = _M_mode & ios_base::in;
       if (__testin && !_M_writing)
 	{
-	  // Check for pback madness, and if so swich back to the
+	  // Check for pback madness, and if so switch back to the
 	  // normal buffers and jet outta here before expensive
 	  // fileops happen...
 	  _M_destroy_pback();

Modified: stable/9/contrib/libstdc++/include/bits/locale_facets.tcc
==============================================================================
--- stable/9/contrib/libstdc++/include/bits/locale_facets.tcc	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/bits/locale_facets.tcc	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1,6 +1,7 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -117,6 +118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       return static_cast<const _Facet&>(*__facets[__i]);
     }
 
+
   // Routine to access a cache for the facet.  If the cache didn't
   // exist before, it gets constructed on the fly.
   template<typename _Facet>
@@ -1015,13 +1017,13 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
 	if (__builtin_expect(__dec, true))
 	  {
 	    // Decimal.
-	    if (__v > 0)
+	    if (__v >= 0)
 	      {
 		if (__flags & ios_base::showpos
 		    && numeric_limits<_ValueT>::is_signed)
 		  *--__cs = __lit[__num_base::_S_oplus], ++__len;
 	      }
-	    else if (__v)
+	    else
 	      *--__cs = __lit[__num_base::_S_ominus], ++__len;
 	  }
 	else if (__flags & ios_base::showbase && __v)

Modified: stable/9/contrib/libstdc++/include/ext/atomicity.h
==============================================================================
--- stable/9/contrib/libstdc++/include/ext/atomicity.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/ext/atomicity.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -42,7 +42,7 @@
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
   // Functions for portable atomic access.
-  // To abstract locking primatives across all thread policies, use:
+  // To abstract locking primitives across all thread policies, use:
   // __exchange_and_add_dispatch
   // __atomic_add_dispatch
 #ifdef _GLIBCXX_ATOMIC_BUILTINS

Modified: stable/9/contrib/libstdc++/include/ext/codecvt_specializations.h
==============================================================================
--- stable/9/contrib/libstdc++/include/ext/codecvt_specializations.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/ext/codecvt_specializations.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -128,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     bool
     good() const throw()
     { 
-      const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+      const descriptor_type __err = (iconv_t)(-1);
       bool __test = _M_in_desc && _M_in_desc != __err; 
       __test &=  _M_out_desc && _M_out_desc != __err;
       return __test;
@@ -166,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     void
     init()
     {
-      const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+      const descriptor_type __err = (iconv_t)(-1);
       const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size();
       if (!_M_in_desc && __have_encodings)
 	{
@@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     void
     destroy() throw()
     {
-      const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+      const descriptor_type __err = (iconv_t)(-1);
       if (_M_in_desc && _M_in_desc != __err) 
 	{
 	  iconv_close(_M_in_desc);

Modified: stable/9/contrib/libstdc++/include/ext/concurrence.h
==============================================================================
--- stable/9/contrib/libstdc++/include/ext/concurrence.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/ext/concurrence.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
   // Available locking policies:
   // _S_single    single-threaded code that doesn't need to be locked.
   // _S_mutex     multi-threaded code that requires additional support
-  //              from gthr.h or abstraction layers in concurrance.h.
+  //              from gthr.h or abstraction layers in concurrence.h.
   // _S_atomic    multi-threaded code using atomic operations.
   enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; 
 

Modified: stable/9/contrib/libstdc++/include/ext/vstring.h
==============================================================================
--- stable/9/contrib/libstdc++/include/ext/vstring.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/ext/vstring.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1407,7 +1407,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find position of a character of C substring.
        *  @param s  String containing characters to locate.
-       *  @param pos  Index of character to search from (default 0).
+       *  @param pos  Index of character to search from.
        *  @param n  Number of characters from s to search for.
        *  @return  Index of first occurrence.
        *
@@ -1468,7 +1468,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find last position of a character of C substring.
        *  @param s  C string containing characters to locate.
-       *  @param pos  Index of character to search back from (default end).
+       *  @param pos  Index of character to search back from.
        *  @param n  Number of characters from s to search for.
        *  @return  Index of last occurrence.
        *
@@ -1499,7 +1499,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find last position of a character.
        *  @param c  Character to locate.
-       *  @param pos  Index of character to search back from (default 0).
+       *  @param pos  Index of character to search back from (default end).
        *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for @a c within this string.
@@ -1529,7 +1529,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find position of a character not in C substring.
        *  @param s  C string containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
+       *  @param pos  Index of character to search from.
        *  @param n  Number of characters from s to consider.
        *  @return  Index of first occurrence.
        *
@@ -1574,8 +1574,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find last position of a character not in string.
        *  @param str  String containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
-       *  @return  Index of first occurrence.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character not
        *  contained in @a str within this string.  If found, returns the index
@@ -1589,9 +1589,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find last position of a character not in C substring.
        *  @param s  C string containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
+       *  @param pos  Index of character to search back from.
        *  @param n  Number of characters from s to consider.
-       *  @return  Index of first occurrence.
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character not
        *  contained in the first @a n characters of @a s within this string.
@@ -1602,10 +1602,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       find_last_not_of(const _CharT* __s, size_type __pos,
 		       size_type __n) const;
       /**
-       *  @brief  Find position of a character not in C string.
+       *  @brief  Find last position of a character not in C string.
        *  @param s  C string containing characters to avoid.
-       *  @param pos  Index of character to search from (default 0).
-       *  @return  Index of first occurrence.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character not
        *  contained in @a s within this string.  If found, returns the index
@@ -1621,8 +1621,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       /**
        *  @brief  Find last position of a different character.
        *  @param c  Character to avoid.
-       *  @param pos  Index of character to search from (default 0).
-       *  @return  Index of first occurrence.
+       *  @param pos  Index of character to search back from (default end).
+       *  @return  Index of last occurrence.
        *
        *  Starting from @a pos, searches backward for a character other than
        *  @a c within this string.  If found, returns the index where it was

Modified: stable/9/contrib/libstdc++/include/tr1/boost_shared_ptr.h
==============================================================================
--- stable/9/contrib/libstdc++/include/tr1/boost_shared_ptr.h	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/tr1/boost_shared_ptr.h	Thu Jan  5 01:48:25 2012	(r229551)
@@ -857,7 +857,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
 	    // Q: How can we get here?
 	    // A: Another thread may have invalidated r after the
 	    //    use_count test above.
-	    return __shared_ptr<element_type>();
+	    return __shared_ptr<element_type, _Lp>();
 	  }
 	
 #else

Modified: stable/9/contrib/libstdc++/include/tr1/random
==============================================================================
--- stable/9/contrib/libstdc++/include/tr1/random	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/include/tr1/random	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1618,10 +1618,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
         result_type
         _M_call(_UniformRandomNumberGenerator& __urng,
 		result_type __min, result_type __max, true_type)
-        { 
+        {
+	  // XXX Must be fixed to also work when __urng.max() - __urng.min()
+	  // is smaller than __max - __min.
 	  typedef typename __gnu_cxx::__add_unsigned<typename
 	    _UniformRandomNumberGenerator::result_type>::__type __utype;
-	  return result_type(__utype(__urng()) % (__max - __min + 1)) + __min;
+	  return result_type((__max - __min + 1.0L)
+			     * (__utype(__urng()) - __utype(__urng.min()))
+			     / (__utype(__urng.max())
+				- __utype(__urng.min()) + 1.0L)) + __min;
 	}
 
       template<typename _UniformRandomNumberGenerator>

Modified: stable/9/contrib/libstdc++/libsupc++/eh_personality.cc
==============================================================================
--- stable/9/contrib/libstdc++/libsupc++/eh_personality.cc	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/libsupc++/eh_personality.cc	Thu Jan  5 01:48:25 2012	(r229551)
@@ -1,5 +1,5 @@
 // -*- C++ -*- The GNU C++ exception personality routine.
-// Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -434,7 +434,7 @@ PERSONALITY_FUNCTION (int version,
   // Parse the LSDA header.
   p = parse_lsda_header (context, language_specific_data, &info);
   info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
-#ifdef HAVE_GETIPINFO
+#ifdef _GLIBCXX_HAVE_GETIPINFO
   ip = _Unwind_GetIPInfo (context, &ip_before_insn);
 #else
   ip = _Unwind_GetIP (context);

Modified: stable/9/contrib/libstdc++/libsupc++/typeinfo
==============================================================================
--- stable/9/contrib/libstdc++/libsupc++/typeinfo	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/libsupc++/typeinfo	Thu Jan  5 01:48:25 2012	(r229551)
@@ -99,7 +99,13 @@ namespace std 
 #endif
     bool operator!=(const type_info& __arg) const
     { return !operator==(__arg); }
-    
+
+    // Return true if this is a pointer type of some kind
+    virtual bool __is_pointer_p() const;
+
+    // Return true if this is a function type
+    virtual bool __is_function_p() const;
+
     // Try and catch a thrown type. Store an adjusted pointer to the
     // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
     // THR_OBJ points to the thrown object. If THR_TYPE is a pointer
@@ -113,12 +119,6 @@ namespace std 
     virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
 			     void **__obj_ptr) const;
 
-   // Return true if this is a pointer type of some kind
-    virtual bool __is_pointer_p() const;
-
-    // Return true if this is a function type
-    virtual bool __is_function_p() const;
-
   protected:
     const char *__name;
     

Modified: stable/9/contrib/libstdc++/src/valarray-inst.cc
==============================================================================
--- stable/9/contrib/libstdc++/src/valarray-inst.cc	Thu Jan  5 01:40:42 2012	(r229550)
+++ stable/9/contrib/libstdc++/src/valarray-inst.cc	Thu Jan  5 01:48:25 2012	(r229551)
@@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   __gslice_to_index(size_t __o, const valarray<size_t>& __l,
                     const valarray<size_t>& __s, valarray<size_t>& __i)
   {
-    // There are as much as dimensions as there are strides.
+    // There are as many dimensions as there are strides.
     size_t __n = __l.size();
 
     // Get a buffer to hold current multi-index as we go through



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201050148.q051mQl5008914>