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: Simon Josefsson
Subject: Re: provide inet_?to? declarations in arpa_inet.h
Date: Wed, 30 Apr 2008 16:14:38 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4
>> index 8f530c5..baddf0d 100644
>> --- a/m4/arpa_inet_h.m4
>> +++ b/m4/arpa_inet_h.m4
>> @@ -32,4 +32,7 @@ AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
>>  [
>>    GNULIB_INET_NTOP=0;     AC_SUBST([GNULIB_INET_NTOP])
>>    GNULIB_INET_PTON=0;     AC_SUBST([GNULIB_INET_PTON])
>> +  dnl Assume proper GNU behavior unless another module says otherwise.
>> +  HAVE_DECL_INET_NTOP=1;  AC_SUBST([HAVE_DECL_INET_NTOP])
>> +  HAVE_DECL_INET_PTON=1;  AC_SUBST([HAVE_DECL_INET_PTON])
>>  ])
>> diff --git a/modules/arpa_inet b/modules/arpa_inet
>> index e5934ac..8c5f3f9 100644
>> --- a/modules/arpa_inet
>> +++ b/modules/arpa_inet
>> @@ -24,6 +24,8 @@ arpa/inet.h:
>>        sed \
>>            -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
>>            -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
>> +          -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.  This is similar to how the unistd module
works.

(arpa_inet.in.h already used these variables, done in the first patch.)

/Simon




reply via email to

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