bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: provide inet_?to? declarations in arpa_inet.h


From: Bruno Haible
Subject: Re: provide inet_?to? declarations in arpa_inet.h
Date: Thu, 1 May 2008 14:39:16 +0200
User-agent: KMail/1.5.4

Simon Josefsson wrote:
> >> +        -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
> >> +        -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
> >>          < $(srcdir)/arpa_inet.in.h; \
> >>    } > address@hidden
> >>    mv address@hidden $@
> >
> > This cannot be correct/complete. You are initializing the two variables
> > to 1, never setting them to 0, and then substituting them. You also need to
> > set them to 0 somewhere, conditionally.
> 
> The variable are set to 0 in the inet_ntop/inet_pton modules, via a
> AC_CHECK_DECLS statement.

No, it isn't. AC_CHECK_DECLS([inet_ntop]...) sets the shell variable
ac_cv_have_decl_inet_ntop to yes or no. It does not set the shell variable
HAVE_DECL_INET_NTOP to 1 or 0.

Look at the generated configure file to convince yourself:
$ ./gnulib-tool --create-testdir --dir=/dev/shm/testdir5 inet_ntop
$ cd /dev/shm/testdir5
$ grep HAVE_DECL_INET_NTOP configure
HAVE_DECL_INET_NTOP
    HAVE_DECL_INET_NTOP=1;
#define HAVE_DECL_INET_NTOP 1
#define HAVE_DECL_INET_NTOP 0

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]