diff options
author | François Dumont <fdumont@gcc.gnu.org> | 2019-12-12 07:14:55 +0000 |
---|---|---|
committer | François Dumont <fdumont@gcc.gnu.org> | 2019-12-12 07:14:55 +0000 |
commit | 8bc1995989018df93c5cdb99179f732b9d511e0c (patch) | |
tree | 5570f0b0a1d7829763098484fcabaf7727fb47b6 | |
parent | d64515f565642383d91f578d9bc68dafabaa005a (diff) | |
download | gcc-8bc1995989018df93c5cdb99179f732b9d511e0c.zip gcc-8bc1995989018df93c5cdb99179f732b9d511e0c.tar.gz gcc-8bc1995989018df93c5cdb99179f732b9d511e0c.tar.bz2 |
libstdc++: Qualify isdigit call to fix versioned namespace build.
* src/c++11/random.cc: Include <cctype>.
(random_devise::_M_init_pretr1): Qualify isdigit call.
From-SVN: r279271
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/random.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6bcdb48..e7639cd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 François Dumont <fdumont@gcc.gnu.org> + + * src/c++11/random.cc: Include <cctype>. + (random_devise::_M_init_pretr1): Qualify isdigit call. + 2019-12-10 Thomas Rodgers <trodgers@redhat.com> * include/pstl/glue_numeric_defs.h: Restore enable_if lost during diff --git a/libstdc++-v3/src/c++11/random.cc b/libstdc++-v3/src/c++11/random.cc index 10fbe1d..04edc58 100644 --- a/libstdc++-v3/src/c++11/random.cc +++ b/libstdc++-v3/src/c++11/random.cc @@ -41,6 +41,7 @@ #include <cerrno> #include <cstdio> +#include <cctype> // For std::isdigit. #if defined _GLIBCXX_HAVE_UNISTD_H && defined _GLIBCXX_HAVE_FCNTL_H # include <unistd.h> @@ -286,7 +287,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _M_mt.seed(seed); #else // Convert old default token "mt19937" or numeric seed tokens to "default". - if (token == "mt19937" || isdigit((unsigned char)token[0])) + if (token == "mt19937" || std::isdigit((unsigned char)token[0])) _M_init("default"); else _M_init(token); |