[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getaddrinfo on NetBSD 5.0
From: |
Bruno Haible |
Subject: |
Re: getaddrinfo on NetBSD 5.0 |
Date: |
Fri, 16 Apr 2010 12:13:41 +0200 |
User-agent: |
KMail/1.9.9 |
Ludovic Courtès wrote:
> I think the problem is that ‘gl_HEADER_NETDB’ determines ‘NETDB_H=''’
> because <netdb.h> is indeed available and it does define ‘struct
> addrinfo’; it just happens to lack some of the AI_ macros.
That explains it. I propose to generate netdb.h always, like we do
with stdlib.h and unistd.h for 3 years and for many others for
2 months. Then we can also add GNULIB_POSIXCHECK advice to <netdb.h>.
Simon, is that ok with you?
2010-04-16 Bruno Haible <address@hidden>
Override netdb.h always.
* modules/netdb (Makefile.am): Augment BUILT_SOURCES always.
* m4/netdb_h.m4 (gl_HEADER_NETDB): Don't set NETDB_H.
Reported by Ludovic Courtès <address@hidden>.
--- m4/netdb_h.m4.orig Fri Apr 16 12:05:25 2010
+++ m4/netdb_h.m4 Fri Apr 16 12:03:21 2010
@@ -1,4 +1,4 @@
-# netdb_h.m4 serial 7
+# netdb_h.m4 serial 8
dnl Copyright (C) 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,
@@ -10,21 +10,11 @@
AC_CHECK_HEADERS_ONCE([netdb.h])
gl_CHECK_NEXT_HEADERS([netdb.h])
if test $ac_cv_header_netdb_h = yes; then
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- #include <netdb.h>
- struct addrinfo a;
- int b = EAI_OVERFLOW;
- int c = AI_NUMERICSERV;
- ]])],
- [NETDB_H=''], [NETDB_H='netdb.h'])
HAVE_NETDB_H=1
else
- NETDB_H='netdb.h'
HAVE_NETDB_H=0
fi
AC_SUBST([HAVE_NETDB_H])
- AC_SUBST([NETDB_H])
])
AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
--- modules/netdb.orig Fri Apr 16 12:05:25 2010
+++ modules/netdb Fri Apr 16 12:03:28 2010
@@ -14,7 +14,7 @@
gl_HEADER_NETDB
Makefile.am:
-BUILT_SOURCES += $(NETDB_H)
+BUILT_SOURCES += netdb.h
# We need the following in order to create <netdb.h> when the system
# doesn't have one that works with the given compiler.