dev  

Re: could that be a bug?

Mladen Turk
Wed, 16 Jul 2008 00:31:21 -0700

Friedrich Dominicus wrote:
Here's the code extract from
apr-util\crypt\getuuid.c

static void get_random_info(unsigned char node[NODE_LENGTH])
{
#if APR_HAS_RANDOM

    (void) apr_generate_random_bytes(node, NODE_LENGTH);

#else

    r.pid = getpid();
    gettimeofday(&r.t, (struct timezone *)0);
    ^^^^^^^^^^^^^
is not there on Windows but in this case it's getting used.

here are the relevevant parts for apr.h:
#define APR_HAS_RANDOM            0
#define APR_HAVE_SYS_TIME_H     0


Inside apr.hw there is
#define APR_HAS_RANDOM            1

... so the APR_HAS_RANDOM *is* defined in apr.h
What apr.h you are looking at?

Regards
--
^(TM)