+2008-10-22 Eric Blake <ebb9@byu.net>
+
+ netdb: also supply struct addrinfo for cygwin 1.5.x
+ * m4/netdb_h.m4 (gl_HEADER_NETDB): Check for incomplete header on
+ older cygwin.
+ * lib/netdb.in.h [!HAVE_STRUCT_ADDRINFO]: Also supply contents for
+ cygwin.
+ * doc/posix-headers/netdb.texi (netdb.h): Document this.
+
2008-10-22 Bruno Haible <bruno@clisp.org>
* users.txt: Update entry about pspp.
POSIX specification: @url{http://www.opengroup.org/susv3xbd/netdb.h.html}
-Gnulib module: ---
+Gnulib module: netdb
Portability problems fixed by Gnulib:
@itemize
@item
This header file is missing on some platforms:
mingw, BeOS.
+
+@item
+This header file is incomplete on some platforms:
+Cygwin 1.5.x
@end itemize
Portability problems not fixed by Gnulib:
#ifndef _GL_NETDB_H
#define _GL_NETDB_H
-#if @HAVE_NETDB_H@
+#if @HAVE_NETDB_H@ && HAVE_STRUCT_ADDRINFO
/* Declarations for a platform that has <netdb.h>. */
/* Get netdb.h definitions such as struct hostent for MinGW. */
#include <sys/socket.h>
-/* Declarations for a platform that lacks <netdb.h>. */
+/* Declarations for a platform that lacks <netdb.h>, or where it is
+ incomplete. */
#if @GNULIB_GETADDRINFO@
-# netdb_h.m4 serial 2
+# netdb_h.m4 serial 3
dnl Copyright (C) 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_REQUIRE([gl_NETDB_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([netdb.h])
if test $ac_cv_header_netdb_h = yes; then
- NETDB_H=''
+ AC_CHECK_TYPES([struct addrinfo], [NETDB_H=''], [NETDB_H='netdb.h'],
+ [[#include <netdb.h>]])
HAVE_NETDB_H=1
else
NETDB_H='netdb.h'