bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] Re: getaddrinfo


From: Simon Josefsson
Subject: [Bug-gnulib] Re: getaddrinfo
Date: Tue, 09 Nov 2004 18:42:30 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

>> +  gl_SOCKET_FAMILIES
>
> Here I would use AC_REQUIRE([gl_SOCKET_FAMILIES]) because if multiple macros
> make use of it, there's no need to have multiple copies of the expanded macro
> in the configure file.

Done.

Unless someone objects, I'll install this soonish.  Then I will try to
find some platform to test it on...

Btw, this construct:

  if (hints
#if HAVE_IPV4
      && hints->ai_family != PF_INET
#endif
#if HAVE_IPV6
      && hints->ai_family != PF_INET6
#endif
      && hints->ai_family != PF_UNSPEC)
    /* FIXME: Support more families. */
    return EAI_FAMILY;

is it legal C?

I have a vague recollection that using CPP #if's inside a C statement
in this way was not valid.  Of course, it works in practice, but maybe
that the above work could be added as another assumption that gnulib
code can use, if people agree it is acceptable.  Perhaps C99, or even
C89, has blessed the above construct.  Or possibly, I'm just confused.

Thanks.




reply via email to

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