apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucian Adrian Grijincu" <lucian.griji...@gmail.com>
Subject Re: APR_CHECK_SIZEOF_EXTENDED issue
Date Sat, 22 Sep 2007 07:27:23 GMT
On 9/21/07, Bob Rossi <bob_rossi@cox.net> wrote:
> On Fri, Sep 21, 2007 at 05:11:09PM +0300, Lucian Adrian Grijincu wrote:
> > Sorry, I didn't realize it was considered deprecated.
> > I'll try and do the patch today/tomorrow.
>
> I'm not an apr developer. I just use apr and know a little about the
> autotools. I would wait until some other the big wigs respond to see if
> this would be acceptable.
>

There is a fundamental difference between AC_CHECK_SIZEOF and
APR_CHECK_SIZEOF_EXTENDED: the APR version does not fail and crash the
./configure script if it cannot find all header files specified in the
arguments.

For example, checking for size_t is currently done this way:
         APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
doing the equivalent:
         AC_CHECK_SIZEOF(size_t, 8, [#include <stdio.h>
         #include <stddef.h>])

crashes the ./configure script because gcc cannot find stddef.h in the
default include directories on my system.

Some systems may be setup in such a way that some standard typenames
(such as size_t) may be defined in nonstandard header files. To be
able to build on those systems too, APR includes a series of header
files which are known to define that typename at least on one system.

This means that either we find a list of header files that need to be
included and are present on ALL systems where APR builds and which
define the typename who's size we're trying to determine and go with
AC_CHECK_SIZEOF or we stay with APR_CHECK_SIZEOF_EXTENDED.

The list of typenames who's sizes is determined with
APR_CHECK_SIZEOF_EXTENDED is: ssize_t, size_t, off_t, pid_t and struct
iovec.

--
Lucian

Mime
View raw message