diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-24 23:47:35 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-24 23:47:35 +0000 |
commit | 6063a3833964eac3fe8034f27dc8205dded3a218 (patch) | |
tree | ad59f054344aa43ea9eab5f7fddfe2b1d0679a81 /libstdc++-v3/acinclude.m4 | |
parent | 1f2ab12033094b3c5dde8e661234bc090cb3b021 (diff) | |
download | gcc-6063a3833964eac3fe8034f27dc8205dded3a218.tar.gz |
2008-08-24 Paolo Carlini <paolo.carlini@oracle.com>
* acinclude.m4 ([GLIBCXX_CHECK_RANDOM_TR1]): Simplify, just use
two test -r instead of an AC_TRY_RUN.
* configure: Regenerate.
* config.h.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139549 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 7c854ecff4c..8ea21ceebba 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1549,27 +1549,24 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ ]) dnl -dnl Check whether "dev/random" and "dev/urandom" are available for the +dnl Check whether "/dev/random" and "/dev/urandom" are available for the dnl random_device of "TR1" (Chapter 5.1, "Random number generation"). dnl AC_DEFUN([GLIBCXX_CHECK_RANDOM_TR1], [ - AC_MSG_CHECKING([for "dev/random" and "dev/urandom" for TR1 random_device]) + AC_MSG_CHECKING([for "/dev/random" and "/dev/urandom" for TR1 random_device]) AC_CACHE_VAL(glibcxx_cv_random_tr1, [ - AC_TRY_RUN([#include <stdio.h> - int main() - { - return !(fopen("/dev/random", "r") - && fopen("/dev/urandom", "r")); - } - ], - [glibcxx_cv_random_tr1=yes], [glibcxx_cv_random_tr1=no], - [glibcxx_cv_random_tr1=no]) + if test -r /dev/random && test -r /dev/urandom; then + glibcxx_cv_random_tr1=yes; + else + glibcxx_cv_random_tr1=no; + fi ]) AC_MSG_RESULT($glibcxx_cv_random_tr1) + if test x"$glibcxx_cv_random_tr1" = x"yes"; then AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1, 1, - [Define if dev/random and dev/urandom are available for + [Define if /dev/random and /dev/urandom are available for the random_device of TR1 (Chapter 5.1).]) fi |