Commit 5345a190 by François Dumont

libstdc++: Fix tr1 definition ambiguity in versioned namespace

	* include/tr1/cctype: Add _GLIBCXX_BEGIN_VERSION_NAMESPACE and
	_GLIBCXX_END_VERSION_NAMESPACE.
	* include/tr1/cfenv: Likewise.
	* include/tr1/cinttypes: Likewise.
	* include/tr1/cstdint: Likewise.
	* include/tr1/cstdio: Likewise.
	* include/tr1/cstdlib: Likewise.
	* include/tr1/cwchar: Likewise.
	* include/tr1/cwctype: Likewise.

From-SVN: r279272
parent 8bc19959
2019-12-12 François Dumont <fdumont@gcc.gnu.org> 2019-12-12 François Dumont <fdumont@gcc.gnu.org>
* include/tr1/cctype: Add _GLIBCXX_BEGIN_VERSION_NAMESPACE and
_GLIBCXX_END_VERSION_NAMESPACE.
* include/tr1/cfenv: Likewise.
* include/tr1/cinttypes: Likewise.
* include/tr1/cstdint: Likewise.
* include/tr1/cstdio: Likewise.
* include/tr1/cstdlib: Likewise.
* include/tr1/cwchar: Likewise.
* include/tr1/cwctype: Likewise.
* src/c++11/random.cc: Include <cctype>. * src/c++11/random.cc: Include <cctype>.
(random_devise::_M_init_pretr1): Qualify isdigit call. (random_devise::_M_init_pretr1): Qualify isdigit call.
......
...@@ -38,10 +38,14 @@ ...@@ -38,10 +38,14 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
using ::isblank; using ::isblank;
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif #endif
......
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
// types // types
...@@ -74,6 +76,8 @@ namespace tr1 ...@@ -74,6 +76,8 @@ namespace tr1
using ::fesetenv; using ::fesetenv;
using ::feupdateenv; using ::feupdateenv;
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif // _GLIBCXX_USE_C99_FENV_TR1 #endif // _GLIBCXX_USE_C99_FENV_TR1
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
// types // types
...@@ -77,6 +79,8 @@ namespace tr1 ...@@ -77,6 +79,8 @@ namespace tr1
using ::wcstoumax; using ::wcstoumax;
#endif #endif
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif // _GLIBCXX_USE_C99_INTTYPES_TR1 #endif // _GLIBCXX_USE_C99_INTTYPES_TR1
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
using ::int8_t; using ::int8_t;
...@@ -96,6 +97,7 @@ namespace tr1 ...@@ -96,6 +97,7 @@ namespace tr1
using ::uintmax_t; using ::uintmax_t;
using ::uintptr_t; using ::uintptr_t;
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif // _GLIBCXX_USE_C99_STDINT_TR1 #endif // _GLIBCXX_USE_C99_STDINT_TR1
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
using std::snprintf; using std::snprintf;
...@@ -46,6 +48,8 @@ namespace tr1 ...@@ -46,6 +48,8 @@ namespace tr1
using std::vscanf; using std::vscanf;
using std::vsscanf; using std::vsscanf;
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif #endif
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
...@@ -63,6 +65,8 @@ namespace tr1 ...@@ -63,6 +65,8 @@ namespace tr1
using std::div; using std::div;
#endif #endif
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif // _GLIBCXX_USE_C99_STDLIB #endif // _GLIBCXX_USE_C99_STDLIB
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
#if _GLIBCXX_HAVE_WCSTOF #if _GLIBCXX_HAVE_WCSTOF
...@@ -58,6 +60,8 @@ namespace tr1 ...@@ -58,6 +60,8 @@ namespace tr1
using std::wcstoull; using std::wcstoull;
#endif #endif
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif // _GLIBCXX_USE_WCHAR_T #endif // _GLIBCXX_USE_WCHAR_T
......
...@@ -37,12 +37,16 @@ ...@@ -37,12 +37,16 @@
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace tr1 namespace tr1
{ {
#if _GLIBCXX_HAVE_ISWBLANK #if _GLIBCXX_HAVE_ISWBLANK
using std::iswblank; using std::iswblank;
#endif #endif
} }
_GLIBCXX_END_NAMESPACE_VERSION
} }
#endif // _GLIBCXX_USE_WCHAR_T #endif // _GLIBCXX_USE_WCHAR_T
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment