This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56475

--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-02-28 08:43:30 UTC ---
(In reply to comment #4)
> I agree. Care to send a patch for that?

Well, something like this should fix the issue:

Index: acinclude.m4
===================================================================
--- acinclude.m4        (Revision 196329)
+++ acinclude.m4        (Arbeitskopie)
@@ -1739,7 +1739,10 @@ AC_DEFUN([GLIBCXX_CHECK_RANDOM_TR1], [
   AC_MSG_CHECKING([for "/dev/random" and "/dev/urandom" for TR1
random_device])

   AC_CACHE_VAL(glibcxx_cv_random_tr1, [
     if test -r /dev/random && test -r /dev/urandom; then
-      glibcxx_cv_random_tr1=yes;
+      case ${target_os} in
+       *mingw*) glibcxx_cv_random_tr1=no ;;
+       *) glibcxx_cv_random_tr1=yes ;;
+      esac
     else
       glibcxx_cv_random_tr1=no;
     fi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]