apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenter Knauf <fua...@apache.org>
Subject conditional in apr_thread_proc.h
Date Wed, 01 Sep 2010 18:11:07 GMT
while checking for missing prototypes I just came over this in 
  * 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);

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:



View raw message