apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: the issue with apr_generate_random_bytes
Date Fri, 21 Mar 2003 01:55:30 GMT
Stas Bekman wrote:

> Hmm, now I see why apr_generate_random_bytes is not exported on AIX.
> For some reason I was checking apr.exp on linux and thought it was
> just a bug in older apr versions that apr_generate_random_bytes wasn't
> exported. my bad. So we have:
> ...
> APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf,
>                                                     apr_size_t length);
> ...
> I thought that apr_ namespace includes only functions available on all
> supported platforms. Is that a wrong assumption? 

Yup. There's no apr_fork on Windows, for instance.

> it looks that one of the linking problems that I had with libapr was
> due to this issue. one of the mod_perl libs provided a perl glue for
> this function, but the function wasn't available on AIX.
> How this situation should be handled? Should we drop the provision of
> the perl glue for this function, as it might be unavailable? 

I'd say that's mod_perl's problem. It should check APR_HAS_RANDOM.

> Are there other apr_ functions that are subject to availability? 

Off the top ot my head: APR_HAS_FORK, APR_HAS_THREADS. Possibly others.

Brane ─îibej   <brane@xbc.nu>   http://www.xbc.nu/brane/

View raw message