This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Feb 2013 08:43:30 +0000
- Subject: [Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)
- Auto-submitted: auto-generated
- References: <bug-56475-4@http.gcc.gnu.org/bugzilla/>
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