bug-gnulib
[Top][All Lists]
Advanced

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

Re: netdb.h


From: Bruno Haible
Subject: Re: netdb.h
Date: Thu, 16 Oct 2008 00:33:59 +0200
User-agent: KMail/1.5.4

Hi Simon,

Good to see more include files covered!

> +#if @HAVE_NETDB_H@
> +
> +/* Declarations for a platform that has <netdb.h>.  */
> +
> +#else
> +
> +/* Declarations for a platform that has <netdb.h>.  */

The second 'has' should be a 'lacks', no?

> +  AC_CACHE_CHECK([whether <netdb.h> is self-contained],
> +    [gl_cv_header_netdb_h_selfcontained],
> +    [
> +      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
> +                                      [[struct hostent h;]])],

Is it a problem on any platform that <netdb.h> is not self-contained?
IIRC, I have looked for this problem a few months ago, and found no platform
where <netdb.h> was not self-contained. If you find some such platforms,
then netdb.in.h must include additional header files; if not, the configure
check can be simplified.

Also, you actually test whether the file defines 'struct hostent'. This
is not needed: all systems that have a <netdb.h> define 'struct hostent'
in it.

Bruno





reply via email to

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