From 513aefc6d7001728ad09ef645e3a3ce25d8d67f5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 12 Aug 2011 00:18:19 -0700 Subject: [PATCH] getaddrinfo: fix sh typo in gai_strerrorA decl checking * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix typo in the generated shell code: it contained a 'break' that was not in a loop. Apparently the macro assumed that AC_CHECK_DECLS is implemenented via a shell-language loop; this may have been true in old Autoconf versions, but it's not true in Autoconf 2.68. I found this bug when testing coreutils git on Solaris 8, whose shell complains about the syntax error. --- ChangeLog | 11 +++++++++++ m4/getaddrinfo.m4 | 17 +++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1bf46d17..6535a0d8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-08-12 Paul Eggert + + getaddrinfo: fix sh typo in gai_strerrorA decl checking + * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix typo in the generated + shell code: it contained a 'break' that was not in a loop. + Apparently the macro assumed that AC_CHECK_DECLS is implemenented + via a shell-language loop; this may have been true in old Autoconf + versions, but it's not true in Autoconf 2.68. I found this bug + when testing coreutils git on Solaris 8, whose shell complains + about the syntax error. + 2011-08-12 Simon Josefsson * lib/base64.c: Fix comment to reference RFC 4648. diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4 index 4fecfb2fa..fe8d14f1e 100644 --- a/m4/getaddrinfo.m4 +++ b/m4/getaddrinfo.m4 @@ -1,4 +1,4 @@ -# getaddrinfo.m4 serial 27 +# getaddrinfo.m4 serial 28 dnl Copyright (C) 2004-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -63,7 +63,7 @@ AC_DEFUN([gl_GETADDRINFO], # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an # inline function declared in ws2tcpip.h, so we need to get that # header included somehow. - AC_CHECK_DECLS([gai_strerror, gai_strerrorA], [], [break], [[ + AC_CHECK_DECLS([gai_strerror], [], [], [[ #include #ifdef HAVE_SYS_SOCKET_H #include @@ -77,6 +77,19 @@ AC_DEFUN([gl_GETADDRINFO], #include ]]) if test $ac_cv_have_decl_gai_strerror = yes; then + AC_CHECK_DECLS([gai_strerrorA], [], [], [[ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +#include +]]) dnl check for correct signature AC_CACHE_CHECK([for gai_strerror with POSIX signature], [gl_cv_func_gai_strerror_posix_signature], [ -- 2.11.0