Mercurial > hg > octave-kai > gnulib-hg
changeset 6319:81f384f9b845
2005-10-01 Simon Josefsson <jas@extundo.com>
* getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
as an (POSIX) extension. Check for sys/types.h, sys/socket.h, and
netdb.h too, needed by getaddrinfo.h. Check if getaddrinfo,
freeaddrinfo and gai_strerror are declared by the POSIX headers.
Check if struct addrinfo is declared.
author | Simon Josefsson <simon@josefsson.org> |
---|---|
date | Sat, 01 Oct 2005 10:27:58 +0000 |
parents | 5ba7d493bd0d |
children | 0a2fddc08f7a |
files | m4/ChangeLog m4/getaddrinfo.m4 |
diffstat | 2 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,11 @@ +2005-10-01 Simon Josefsson <jas@extundo.com> + + * getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo + as an (POSIX) extension. Check for sys/types.h, sys/socket.h, and + netdb.h too, needed by getaddrinfo.h. Check if getaddrinfo, + freeaddrinfo and gai_strerror are declared by the POSIX headers. + Check if struct addrinfo is declared. + 2005-10-01 Jim Meyering <jim@meyering.net> Sync from coreutils.
--- a/m4/getaddrinfo.m4 +++ b/m4/getaddrinfo.m4 @@ -18,5 +18,22 @@ AC_REQUIRE([gl_C_RESTRICT]) AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS_ONCE([netinet/in.h]) + AC_REQUIRE([AC_GNU_SOURCE]) + AC_CHECK_HEADERS_ONCE(sys/socket.h netdb.h sys/types.h netinet/in.h) + AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror],,,[ +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +# include <netdb.h> +#endif ]) + AC_CHECK_TYPES([struct addrinfo],,,[ +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +# include <netdb.h> +#endif +]) +])