ai_flags in BSD/OS

Russ Allbery rra at stanford.edu
Sat Jan 31 19:37:53 UTC 2009


Julien ÉLIE <julien at trigofacile.com> writes:

> It looks as though my autoconf 2.61 were broken:
>    struct addrinfo hints, *ai;
> is not understood, contrary to:
>    struct addrinfo hints;
>    struct addrinfo *ai;

Hm, that means there's some missing quoting somewhere.  The comma is being
interpreted by m4 as an argument separator.

Ah, right, AC_TRY_RUN is weird in that it double-quotes its first
argument, which means that the source macro invocation can't be quoted.
But then you run into trouble with commas and the like inside the source
unless the source is double-quoted.

The right way to fix this is to stop using AC_TRY_RUN, which is deprecated
precisely because it has weird bits like this, and start using
AC_RUN_IFELSE.  I just checked in a change to m4/getaddrinfo.m4 that does
that.  The other probes in INN that use AC_TRY_RUN (or AC_TRY_LINK,
AC_TRY_CPP, or AC_TRY_COMPILE) should be changed to use the AC_*_IFELSE
functions and AC_LANG_SOURCE or AC_LANG_PROGRAM instead.

I'm working on releasing the portability code that started from INN and
that I've then updated and modified for a bunch of other packages as a
separate package, after which we will hopefully be able to update INN to
use a shared version of a lot of this portability code and let it get the
benefits of changes and tests done in other packages as well.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.



More information about the inn-workers mailing list