* lib/arpa_inet.in.h: On NonStop Kernel, include also <netdb.h>.
* m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
* m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Include also <netdb.h> when
looking for the declaration.
* m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
* doc/posix-functions/inet_ntop.texi: Document the NonStop Kernel
problem.
* doc/posix-functions/inet_pton.texi: Likewise.
+2010-12-26 Bruno Haible <bruno@clisp.org>
+
+ inet_ntop, inet_pton: Ensure declaration on NonStop Kernel.
+ * lib/arpa_inet.in.h: On NonStop Kernel, include also <netdb.h>.
+ * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
+ * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Include also <netdb.h> when
+ looking for the declaration.
+ * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
+ * doc/posix-functions/inet_ntop.texi: Document the NonStop Kernel
+ problem.
+ * doc/posix-functions/inet_pton.texi: Likewise.
+
2010-12-26 Bruno Haible <bruno@clisp.org>
arpa_inet: Use the common idioms with C++ support.
@item
This function is missing on some platforms:
HP-UX 11.00, OSF/1 4.0, Solaris 2.5.1, mingw, Interix 3.5, BeOS.
+@item
+This function is declared in @code{<netdb.h>} instead of @code{<arpa/inet.h>}
+on some platforms:
+NonStop Kernel.
@end itemize
Portability problems not fixed by Gnulib:
@item
This function is missing on some platforms:
HP-UX 11.00, OSF/1 4.0, Solaris 2.5.1, mingw, Interix 3.5, BeOS.
+@item
+This function is declared in @code{<netdb.h>} instead of @code{<arpa/inet.h>}
+on some platforms:
+NonStop Kernel.
@end itemize
Portability problems not fixed by Gnulib:
# include <sys/socket.h>
#endif
+/* On NonStop Kernel, inet_ntop and inet_pton are declared in <netdb.h>.
+ But avoid namespace pollution on glibc systems. */
+#if defined __TANDEM && !defined __GLIBC__
+# include <netdb.h>
+#endif
+
#if @HAVE_ARPA_INET_H@
/* The include_next requires a split double-inclusion guard. */
-# arpa_inet_h.m4 serial 10
+# arpa_inet_h.m4 serial 11
dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
#if !(defined __GLIBC__ || defined __UCLIBC__)
# include <sys/socket.h>
#endif
+#ifdef __TANDEM
+# include <netdb.h>
+#endif
#include <arpa/inet.h>
]], [inet_ntop inet_pton])
])
-# inet_ntop.m4 serial 12
+# inet_ntop.m4 serial 13
dnl Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/inet_ntop.c.
AC_DEFUN([gl_PREREQ_INET_NTOP], [
- AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>])
+ AC_CHECK_HEADERS_ONCE([netdb.h])
+ AC_CHECK_DECLS([inet_ntop],,,
+ [#include <arpa/inet.h>
+ #if HAVE_NETDB_H
+ # include <netdb.h>
+ #endif
+ ])
if test $ac_cv_have_decl_inet_ntop = no; then
HAVE_DECL_INET_NTOP=0
fi
-# inet_pton.m4 serial 10
+# inet_pton.m4 serial 11
dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/inet_pton.c.
AC_DEFUN([gl_PREREQ_INET_PTON], [
- AC_CHECK_DECLS([inet_pton],,,[#include <arpa/inet.h>])
+ AC_CHECK_HEADERS_ONCE([netdb.h])
+ AC_CHECK_DECLS([inet_pton],,,
+ [#include <arpa/inet.h>
+ #if HAVE_NETDB_H
+ # include <netdb.h>
+ #endif
+ ])
if test $ac_cv_have_decl_inet_pton = no; then
HAVE_DECL_INET_PTON=0
fi