On 09/01/2010 08:11 PM, Guenter Knauf wrote:
> while checking for missing prototypes I just came over this in
> apr_thread_proc.h:
> #if APR_HAVE_STRUCT_RLIMIT
> /**
> * Set the Resource Utilization limits when starting a new process.
> * @param attr The procattr we care about.
> * @param what Which limit to set, one of:
> * <PRE>
> * APR_LIMIT_CPU
> * APR_LIMIT_MEM
> * APR_LIMIT_NPROC
> * APR_LIMIT_NOFILE
> * </PRE>
> * @param limit Value to set the limit to.
> */
> APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
> apr_int32_t what,
> struct rlimit *limit);
> #endif
>
> so the public API changes depending on APR_HAVE_STRUCT_RLIMIT which I
> think is wrong; we need to remove the ifdef and all platforms which have
> APR_HAVE_STRUCT_RLIMIT=0 need to provide a stub like in beos/proc.c:
> APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
> apr_int32_t what,
> void *limit)
> {
> return APR_ENOTIMPL;
> }
>
> it seems that this stub is missing for win32 and os/2 ...
>
> unfortunately this is a very old add, so it affects all APR versions:
> http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_thread_proc.h?r1=60147&r2=60146&pathrev=60147
I agree that we should fix this. But as I understand the versioning rules, this
could
be only done in trunk and 1.5 (not released), as otherwise we would change the
API/ABI on platforms
with APR_HAVE_STRUCT_RLIMIT undefined, correct?
Regards
Rüdiger