libstdc++: Qualify isdigit call to fix versioned namespace build.
authorFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 12 Dec 2019 07:14:55 +0000 (07:14 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 12 Dec 2019 07:14:55 +0000 (07:14 +0000)
* src/c++11/random.cc: Include <cctype>.
(random_devise::_M_init_pretr1): Qualify isdigit call.

From-SVN: r279271

libstdc++-v3/ChangeLog
libstdc++-v3/src/c++11/random.cc

index 6bcdb4895d01d7d06a868b691a83e42c72c9a415..e7639cdadcd79c848744c284f09103a09d551309 100644 (file)
@@ -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
index 10fbe1dc4c43f61bd5ed3f42ee4c3cd6e1253435..04edc582b69e89e6f48a494cf5291c7e8f9c4b7f 100644 (file)
@@ -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);