diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2005-11-27 21:45:21 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2005-11-27 21:45:21 +0000 |
commit | b3bc7c4e0de0f2b82ba5379e8f5a6a54549d565f (patch) | |
tree | 8353c6429564ad8bdb7cd0fef7faf0ab1b3c1954 /gnu/usr.bin/lynx/configure | |
parent | b2fafc5cbfb504a474834fb4200f4bce2e91a1c5 (diff) |
make lynx(1) to use arc4random(4) instead of other random functions;
avoid a segfault by checking the value of TAB TO;
from Alexey Dobriyan <adobriyan@gmail.com>; pushed by deraadt@
Diffstat (limited to 'gnu/usr.bin/lynx/configure')
-rw-r--r-- | gnu/usr.bin/lynx/configure | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/usr.bin/lynx/configure b/gnu/usr.bin/lynx/configure index 632c12dd800..69c95848e4a 100644 --- a/gnu/usr.bin/lynx/configure +++ b/gnu/usr.bin/lynx/configure @@ -11387,7 +11387,7 @@ if eval "test \"`echo '$''{'cf_cv_srand_func'+set}'`\" = set"; then else cf_cv_srand_func=unknown -for cf_func in srandom/random srand48/lrand48 srand/rand +for cf_func in arc4random srandom/random srand48/lrand48 srand/rand do cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'` cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'` @@ -11403,7 +11403,7 @@ cat > conftest.$ac_ext <<EOF #endif int main() { -long seed = 1; $cf_srand_func(seed); seed = $cf_rand_func() +long seed = 1; seed = $cf_rand_func() ; return 0; } EOF if { (eval echo configure:11410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -11432,6 +11432,10 @@ else cf_cv_rand_max=RAND_MAX cf_rand_max=16 ;; + arc4random) + cf_cv_rand_max=0xFFFFFFFFUL + cf_rand_max=32 + ;; *) cf_cv_rand_max=INT_MAX cf_rand_max=31 |