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 APR_CHECK_SIZEOF_EXTENDED issue
Date Fri, 21 Sep 2007 13:12:03 GMT
The current APR_CHECK_SIZEOF_EXTENDED includes stdio.h before doing
anything specified by the macro caller.

dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
[snip]
[AC_TRY_RUN([#include <stdio.h>
$1
main()
{
  FILE *f=fopen("conftestval", "w");
[snip]


Say someone needs to do something like this:

APR_CHECK_SIZEOF_EXTENDED(#define _FILE_OFFSET_BITS=64
#include <sys/types.h>, off_t [, whatever])

or whatever #define that may change the default behaviour and
consequencs of including stdio.h first.

Wouldn't it be better if we switch to something like:
[snip]
[AC_TRY_RUN([$1
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
[snip]

and permit this kind of behaviour too?


--
Lucian

Mime
View raw message