commit 2f555dc433089e1ae36f0ca6bd79424814bbc218
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Dec 22 16:28:28 2014 +0000

    	PR libstdc++/37522
    	* include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll,
    	stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF
    	to guard definition of to_wstring.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
    	Do not use dg-require-string-conversions.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
    	Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/
    	stoull.cc: Likewise.
    	* testsuite/21_strings/basic_string/numeric_conversions/char/
    	to_string.cc: Likewise.

diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 7729384..6423c59 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -5240,8 +5240,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace
 
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
-     && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
 
 #include <ext/string_conversions.h>
 
@@ -5392,6 +5391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
   stold(const wstring& __str, size_t* __idx = 0)
   { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
 
+#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
   // DR 1261.
   inline wstring
   to_wstring(int __val)
@@ -5453,6 +5453,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
     return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
 					    L"%Lf", __val);
   }
+#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
 #endif
 
 _GLIBCXX_END_NAMESPACE_CXX11
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc
index b9de1cd..e7fea9e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2009-11-11  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc
index 5e3060c..fa9dedb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
index 607f97b..16b9fc2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc
index 6c0fb98..1032e6e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc
index 9cdb4b0..df6ad78 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc
index 039534c..e201780 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc
index dce8fdf..b5ced9f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc
index 9cc2609..29c462b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc
index 8a04e07..3900431 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
index 516e602..4f7f75a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
@@ -1,5 +1,4 @@
 // { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
