On 15/11/15 09:58 +0100, Christophe Lyon wrote:
Ha, and my newlib copy is not very recent, it's from Oct 30th 2013: maybe it's too old?
The autoconf checks should handle old versions as well as new. The problem is I didn't change a defined(_GLIBCXX_USE_C99_WCHAR) to just test its value, rather than whether it's defined. As I added to include/bits/c++config on Friday: // N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally // so they should be tested with #if not with #ifdef. Fixed with this patch, committed to trunk.
commit 8c33b5d8510378148bdac7247fd99b1f70eec04f Author: Jonathan Wakely <jwak...@redhat.com> Date: Sun Nov 15 11:03:54 2015 +0000 PR libstdc++/68353 fix _GLIBCXX_USE_C99_WCHAR test PR libstdc++/68353 * include/bits/basic_string.h: Test value of _GLIBCXX_USE_C99_WCHAR not whether it is defined. * include/ext/vstring.h: Likewise. diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index b3853cd..e7f965e 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -5503,7 +5503,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 } #endif // _GLIBCXX_USE_C99_STDIO -#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR) +#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR inline int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 8732bd3..529e4f3 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -2794,7 +2794,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif // _GLIBCXX_USE_C99_STDIO -#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR) +#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR inline int stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),