Wouldn't adding a new function be more suitable? http://apr.apache.org/docs/apr/1.2/group__apr__random.html: apr_generate_random_bytes says it will "Generate random bytes". This says nothing about the "pseudo-" vs. "true-" randomness of the generated array.
apr_generate_random_bytes_ex with an extra "flags" field seems a better way: * APR_RANDOM_TRUE - a true random source, return an error if no true random source is found on the system. * APR_RANDOM_PSEUDO - a pseudo * we could provide a O_NONBLOCK like flag: if specified when using APR_RANDOM_TRUE and the source does not have enough bits we can return an error. > --- Comment #1 from Bojan Smojver <[EMAIL PROTECTED]> 2008-04-27 > 23:29:28 PST --- > Suggested fix: > > Index: configure.in > =================================================================== > --- configure.in (revision 651703) > +++ configure.in (working copy) > @@ -1955,7 +1955,7 @@ > if test "$apr_devrandom" = "yes"; then > # /dev/random on OpenBSD doesn't provide random data, so > # prefer /dev/arandom, which does; see random(4). > - for f in /dev/arandom /dev/random /dev/urandom; do > + for f in /dev/arandom /dev/urandom /dev/random; do > if test -r $f; then > apr_devrandom=$f > rand=1 > -- Lucian
