INN commit: branches/2.6 (9 files)

INN Commit rra at isc.org
Fri Mar 26 19:11:25 UTC 2021


    Date: Friday, March 26, 2021 @ 12:11:25
  Author: iulius
Revision: 10553

Update to latest upstream rra-c-util 9.0 version

Merge of commits 10548 and 10551 in CURRENT, as well as a revert
of wrongly committed tests/lib/fdflag-t.c and tests/runtests.c
files in STABLE (commit 10523 contained a change to these files
in the test suite, hopefully with no impact at all on STABLE).

Modified:
  branches/2.6/m4/cc-flags.m4
  branches/2.6/m4/krb5-config.m4
  branches/2.6/m4/krb5.m4
  branches/2.6/m4/lib-pathname.m4
  branches/2.6/m4/pam-const.m4
  branches/2.6/m4/perl.m4
  branches/2.6/m4/python.m4
  branches/2.6/tests/lib/fdflag-t.c
  branches/2.6/tests/runtests.c

----------------------+
 m4/cc-flags.m4       |    2 
 m4/krb5-config.m4    |    2 
 m4/krb5.m4           |  243 +++++++++++++++++++++++--------------------------
 m4/lib-pathname.m4   |    1 
 m4/pam-const.m4      |    8 -
 m4/perl.m4           |    8 +
 m4/python.m4         |    7 -
 tests/lib/fdflag-t.c |   20 +++-
 tests/runtests.c     |   10 --
 9 files changed, 153 insertions(+), 148 deletions(-)

Modified: m4/cc-flags.m4
===================================================================
--- m4/cc-flags.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/cc-flags.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -9,7 +9,7 @@
 dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
-dnl Copyright 2016-2020 Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2016-2021 Russ Allbery <eagle at eyrie.org>
 dnl Copyright 2006, 2009, 2016
 dnl     by Internet Systems Consortium, Inc. ("ISC")
 dnl

Modified: m4/krb5-config.m4
===================================================================
--- m4/krb5-config.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/krb5-config.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -12,7 +12,7 @@
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle at eyrie.org>
-dnl Copyright 2018 Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2018, 2021 Russ Allbery <eagle at eyrie.org>
 dnl Copyright 2011-2012
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl

Modified: m4/krb5.m4
===================================================================
--- m4/krb5.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/krb5.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -1,4 +1,5 @@
 dnl Find the compiler and linker flags for Kerberos.
+dnl $Id$
 dnl
 dnl Finds the compiler and linker flags for linking with Kerberos libraries.
 dnl Provides the --with-krb5, --with-krb5-include, and --with-krb5-lib
@@ -106,136 +107,132 @@
 dnl AC_CHECK_HEADERS.  This is used if there were arguments to configure
 dnl specifying the Kerberos header path, since we may have one header in the
 dnl default include path and another under our explicitly-configured Kerberos
-dnl location.  Sets inn_krb5_header_found to true if the header is found.
+dnl location.  The second argument is run if the header was found.
 AC_DEFUN([_INN_LIB_KRB5_CHECK_HEADER],
 [AC_MSG_CHECKING([for $1])
  AS_IF([test -f "${inn_krb5_incroot}/$1"],
-    [inn_krb5_header_found=true
-     AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
+    [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
         [Define to 1 if you have the <$1> header file.])
-     AC_MSG_RESULT([yes])],
+     AC_MSG_RESULT([yes])
+     $2],
     [AC_MSG_RESULT([no])])])
 
 dnl Check for the com_err header.  Internal helper macro since we need
-dnl to do the same checks in multiple places.  Sets inn_krb5_header_found
-dnl to true if one header is found.
+dnl to do the same checks in multiple places.
 AC_DEFUN([_INN_LIB_KRB5_CHECK_HEADER_COM_ERR],
 [AS_IF([test x"$inn_krb5_incroot" = x],
-   [AC_CHECK_HEADERS([et/com_err.h kerberosv5/com_err.h],
-                     [inn_krb5_header_found=true])],
-       [_INN_LIB_KRB5_CHECK_HEADER([et/com_err.h])
-        _INN_LIB_KRB5_CHECK_HEADER([kerberosv5/com_err.h])])])
+    [AC_CHECK_HEADERS([et/com_err.h kerberosv5/com_err.h])],
+        [_INN_LIB_KRB5_CHECK_HEADER([et/com_err.h])
+         _INN_LIB_KRB5_CHECK_HEADER([kerberosv5/com_err.h])])])
 
 dnl Check for the main Kerberos header.  Internal helper macro since we need
-dnl to do the same checks in multiple places.  Sets inn_krb5_header_found
-dnl to true if one header is found.
+dnl to do the same checks in multiple places.  The first argument is run if
+dnl some header was found, and the second if no header was found.
+dnl header could not be found.
 AC_DEFUN([_INN_LIB_KRB5_CHECK_HEADER_KRB5],
-[AS_IF([test x"$inn_krb5_incroot" = x],
+[inn_krb5_found_header=
+ AS_IF([test x"$inn_krb5_incroot" = x],
      [AC_CHECK_HEADERS([krb5.h kerberosv5/krb5.h krb5/krb5.h],
-                       [inn_krb5_header_found=true])],
-     [_INN_LIB_KRB5_CHECK_HEADER([krb5.h])
-      _INN_LIB_KRB5_CHECK_HEADER([kerberosv5/krb5.h])
-      _INN_LIB_KRB5_CHECK_HEADER([krb5/krb5.h])])])
+         [inn_krb5_found_header=true])],
+     [_INN_LIB_KRB5_CHECK_HEADER([krb5.h],
+         [inn_krb5_found_header=true])
+      _INN_LIB_KRB5_CHECK_HEADER([kerberosv5/krb5.h],
+         [inn_krb5_found_header=true])
+      _INN_LIB_KRB5_CHECK_HEADER([krb5/krb5.h],
+         [inn_krb5_found_header=true])])
+ AS_IF([test x"$inn_krb5_found_header" = xtrue], [$1], [$2])])
 
 dnl Does the appropriate library checks for reduced-dependency Kerberos
 dnl linkage.  The single argument, if true, says to fail if Kerberos could not
 dnl be found.
 AC_DEFUN([_INN_LIB_KRB5_REDUCED],
-[inn_krb5_header_found=false
- _INN_LIB_KRB5_CHECK_HEADER_KRB5
- AS_IF([test x"$inn_krb5_header_found" = xtrue],
-     [INN_LIB_KRB5_SWITCH
-      AC_CHECK_LIB([krb5], [krb5_init_context],
-         [KRB5_LIBS="-lkrb5"
-          LIBS="$KRB5_LIBS $LIBS"
-          AC_CHECK_FUNCS([krb5_get_error_message],
-             [AC_CHECK_FUNCS([krb5_free_error_message])],
-             [AC_CHECK_FUNCS([krb5_get_error_string], [],
-                 [AC_CHECK_FUNCS([krb5_get_err_txt], [],
-                     [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
-                         [KRB5_LIBS="$KRB5_LIBS -lksvc"
-                          AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
-                          AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
-                             [INN_INCLUDES_KRB5])],
-                         [inn_krb5_header_found=false
-                          _INN_LIB_KRB5_CHECK_HEADER_COM_ERR
-                          AS_IF([test x"$inn_krb5_header_found" = xtrue],
-                             [AC_CHECK_LIB([com_err], [com_err],
-                                 [KRB5_LIBS="$KRB5_LIBS -lcom_err"],
-                                 [AS_IF([test x"$1" = xtrue],
-                                     [AC_MSG_ERROR([cannot find usable com_err library])],
-                                     [KRB5_LIBS=""])])],
-                             [AS_IF([test x"$1" = xtrue],
-                                 [AC_MSG_ERROR([cannot find usable com_err header])])])])])])])],
-         [AS_IF([test x"$1" = xtrue],
-             [AC_MSG_ERROR([cannot find usable Kerberos library])])])],
-     [AS_IF([test x"$1" = xtrue],
-         [AC_MSG_ERROR([cannot find usable Kerberos header])])])
- INN_LIB_KRB5_RESTORE])
-
-dnl Does the appropriate library checks for Kerberos linkage when we don't
-dnl have krb5-config or reduced dependencies.  The single argument, if true,
-dnl says to fail if Kerberos could not be found.
-AC_DEFUN([_INN_LIB_KRB5_MANUAL],
-[inn_krb5_header_found=false
- _INN_LIB_KRB5_CHECK_HEADER_KRB5
- AS_IF([test x"$inn_krb5_header_found" = xtrue],
-    [INN_LIB_KRB5_SWITCH
-     inn_krb5_extra=
-     LIBS=
-     AC_SEARCH_LIBS([res_search], [resolv], [],
-        [AC_SEARCH_LIBS([__res_search], [resolv])])
-     AC_SEARCH_LIBS([gethostbyname], [nsl])
-     AC_SEARCH_LIBS([socket], [socket], [],
-        [AC_CHECK_LIB([nsl], [socket], [LIBS="-lnsl -lsocket $LIBS"], [],
-            [-lsocket])])
-     AC_SEARCH_LIBS([crypt], [crypt])
-     AC_SEARCH_LIBS([roken_concat], [roken])
-     inn_krb5_extra="$LIBS"
-     LIBS="$inn_krb5_save_LIBS"
-     AC_CHECK_LIB([krb5], [krb5_init_context],
-        [KRB5_LIBS="-lkrb5 -lasn1 -lcom_err -lcrypto $inn_krb5_extra"],
-        [AC_CHECK_LIB([krb5support], [krb5int_getspecific],
-            [inn_krb5_extra="-lkrb5support $inn_krb5_extra"],
-            [AC_CHECK_LIB([pthreads], [pthread_setspecific],
-                [inn_krb5_pthread="-lpthreads"],
-                [AC_CHECK_LIB([pthread], [pthread_setspecific],
-                    [inn_krb5_pthread="-lpthread"])])
-             AC_CHECK_LIB([krb5support], [krb5int_setspecific],
-                [inn_krb5_extra="-lkrb5support $inn_krb5_extra $inn_krb5_pthread"],
-                [], [$inn_krb5_pthread $inn_krb5_extra])],
-            [$inn_krb5_extra])
-         AC_CHECK_LIB([com_err], [error_message],
-            [inn_krb5_extra="-lcom_err $inn_krb5_extra"], [], [$inn_krb5_extra])
-         AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
-            [inn_krb5_extra="-lksvc $inn_krb5_extra"], [], [$inn_krb5_extra])
-         AC_CHECK_LIB([k5crypto], [krb5int_hash_md5],
-            [inn_krb5_extra="-lk5crypto $inn_krb5_extra"], [], [$inn_krb5_extra])
-         AC_CHECK_LIB([k5profile], [profile_get_values],
-            [inn_krb5_extra="-lk5profile $inn_krb5_extra"], [], [$inn_krb5_extra])
-         AC_CHECK_LIB([krb5], [krb5_cc_default],
-            [KRB5_LIBS="-lkrb5 $inn_krb5_extra"],
-            [AS_IF([test x"$1" = xtrue],
-                [AC_MSG_ERROR([cannot find usable Kerberos library])])],
-            [$inn_krb5_extra])],
-        [-lasn1 -lcom_err -lcrypto $inn_krb5_extra])
+[INN_LIB_KRB5_SWITCH
+ AC_CHECK_LIB([krb5], [krb5_init_context],
+    [KRB5_LIBS="-lkrb5"
      LIBS="$KRB5_LIBS $LIBS"
      AC_CHECK_FUNCS([krb5_get_error_message],
         [AC_CHECK_FUNCS([krb5_free_error_message])],
         [AC_CHECK_FUNCS([krb5_get_error_string], [],
             [AC_CHECK_FUNCS([krb5_get_err_txt], [],
-                [AC_CHECK_FUNCS([krb5_svc_get_msg],
-                    [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
+                [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
+                    [KRB5_LIBS="$KRB5_LIBS -lksvc"
+                     AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
+                     AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
                         [INN_INCLUDES_KRB5])],
-                    [inn_krb5_header_found=false
-                     _INN_LIB_KRB5_CHECK_HEADER_COM_ERR
-                     AS_IF([test x"$inn_krb5_header_found" != xtrue],
+                    [AC_CHECK_LIB([com_err], [com_err],
+                        [KRB5_LIBS="$KRB5_LIBS -lcom_err"],
                         [AS_IF([test x"$1" = xtrue],
-                            [AC_MSG_ERROR([cannot find usable com_err header])])])])])])])],
-     [AS_IF([test x"$1" = xtrue],
-         [AC_MSG_ERROR([cannot find usable Kerberos header])])])
+                            [AC_MSG_ERROR([cannot find usable com_err library])],
+                            [KRB5_LIBS=""])])
+                     _INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
+     _INN_LIB_KRB5_CHECK_HEADER_KRB5([],
+        [KRB5_CPPFLAGS=
+         KRB5_LIBS=
+         AS_IF([test x"$1" = xtrue],
+            [AC_MSG_ERROR([cannot find usable Kerberos header])])])],
+    [AS_IF([test x"$1" = xtrue],
+        [AC_MSG_ERROR([cannot find usable Kerberos library])])])
  INN_LIB_KRB5_RESTORE])
 
+dnl Does the appropriate library checks for Kerberos linkage when we don't
+dnl have krb5-config or reduced dependencies.  The single argument, if true,
+dnl says to fail if Kerberos could not be found.
+AC_DEFUN([_INN_LIB_KRB5_MANUAL],
+[INN_LIB_KRB5_SWITCH
+ inn_krb5_extra=
+ LIBS=
+ AC_SEARCH_LIBS([res_search], [resolv], [],
+    [AC_SEARCH_LIBS([__res_search], [resolv])])
+ AC_SEARCH_LIBS([gethostbyname], [nsl])
+ AC_SEARCH_LIBS([socket], [socket], [],
+    [AC_CHECK_LIB([nsl], [socket], [LIBS="-lnsl -lsocket $LIBS"], [],
+        [-lsocket])])
+ AC_SEARCH_LIBS([crypt], [crypt])
+ AC_SEARCH_LIBS([roken_concat], [roken])
+ inn_krb5_extra="$LIBS"
+ LIBS="$inn_krb5_save_LIBS"
+ AC_CHECK_LIB([krb5], [krb5_init_context],
+    [KRB5_LIBS="-lkrb5 -lasn1 -lcom_err -lcrypto $inn_krb5_extra"],
+    [AC_CHECK_LIB([krb5support], [krb5int_getspecific],
+        [inn_krb5_extra="-lkrb5support $inn_krb5_extra"],
+        [AC_CHECK_LIB([pthreads], [pthread_setspecific],
+            [inn_krb5_pthread="-lpthreads"],
+            [AC_CHECK_LIB([pthread], [pthread_setspecific],
+                [inn_krb5_pthread="-lpthread"])])
+         AC_CHECK_LIB([krb5support], [krb5int_setspecific],
+            [inn_krb5_extra="-lkrb5support $inn_krb5_extra $inn_krb5_pthread"],
+            [], [$inn_krb5_pthread $inn_krb5_extra])],
+        [$inn_krb5_extra])
+     AC_CHECK_LIB([com_err], [error_message],
+        [inn_krb5_extra="-lcom_err $inn_krb5_extra"], [], [$inn_krb5_extra])
+     AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
+        [inn_krb5_extra="-lksvc $inn_krb5_extra"], [], [$inn_krb5_extra])
+     AC_CHECK_LIB([k5crypto], [krb5int_hash_md5],
+        [inn_krb5_extra="-lk5crypto $inn_krb5_extra"], [], [$inn_krb5_extra])
+     AC_CHECK_LIB([k5profile], [profile_get_values],
+        [inn_krb5_extra="-lk5profile $inn_krb5_extra"], [], [$inn_krb5_extra])
+     AC_CHECK_LIB([krb5], [krb5_cc_default],
+        [KRB5_LIBS="-lkrb5 $inn_krb5_extra"],
+        [AS_IF([test x"$1" = xtrue],
+            [AC_MSG_ERROR([cannot find usable Kerberos library])])],
+        [$inn_krb5_extra])],
+    [-lasn1 -lcom_err -lcrypto $inn_krb5_extra])
+ LIBS="$KRB5_LIBS $LIBS"
+ AC_CHECK_FUNCS([krb5_get_error_message],
+     [AC_CHECK_FUNCS([krb5_free_error_message])],
+     [AC_CHECK_FUNCS([krb5_get_error_string], [],
+         [AC_CHECK_FUNCS([krb5_get_err_txt], [],
+             [AC_CHECK_FUNCS([krb5_svc_get_msg],
+                 [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
+                     [INN_INCLUDES_KRB5])],
+                 [_INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
+ _INN_LIB_KRB5_CHECK_HEADER_KRB5([],
+    [KRB5_CPPFLAGS=
+     KRB5_LIBS=
+     AS_IF([test x"$1" = xtrue],
+        [AC_MSG_ERROR([cannot find usable Kerberos header])])])
+ INN_LIB_KRB5_RESTORE])
+
 dnl Sanity-check the results of krb5-config and be sure we can really link a
 dnl Kerberos program.  If that fails, clear KRB5_CPPFLAGS and KRB5_LIBS so
 dnl that we know we don't have usable flags and fall back on the manual
@@ -243,7 +240,12 @@
 AC_DEFUN([_INN_LIB_KRB5_CHECK],
 [INN_LIB_KRB5_SWITCH
  AC_CHECK_FUNC([krb5_init_context],
-    [INN_LIB_KRB5_RESTORE],
+    [_INN_LIB_KRB5_CHECK_HEADER_KRB5([INN_LIB_KRB5_RESTORE],
+        [INN_LIB_KRB5_RESTORE
+         KRB5_CPPFLAGS=
+         KRB5_LIBS=
+         _INN_LIB_KRB5_PATHS
+         _INN_LIB_KRB5_MANUAL([$1])])],
     [INN_LIB_KRB5_RESTORE
      KRB5_CPPFLAGS=
      KRB5_LIBS=
@@ -255,26 +257,17 @@
 dnl falls back on the manual checks.
 AC_DEFUN([_INN_LIB_KRB5_CONFIG],
 [INN_KRB5_CONFIG([${inn_krb5_root}], [krb5], [KRB5],
-    [inn_krb5_header_found=false
-     _INN_LIB_KRB5_CHECK_HEADER_KRB5
-     AS_IF([test x"$inn_krb5_header_found" = xtrue],
-        [_INN_LIB_KRB5_CHECK([$1])
-         INN_LIB_KRB5_SWITCH
-         AC_CHECK_FUNCS([krb5_get_error_message],
-             [AC_CHECK_FUNCS([krb5_free_error_message])],
-             [AC_CHECK_FUNCS([krb5_get_error_string], [],
-                 [AC_CHECK_FUNCS([krb5_get_err_txt], [],
-                     [AC_CHECK_FUNCS([krb5_svc_get_msg],
-                         [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
-                             [INN_INCLUDES_KRB5])],
-                         [inn_krb5_header_found=false
-                          _INN_LIB_KRB5_CHECK_HEADER_COM_ERR
-                          AS_IF([test x"$inn_krb5_header_found" != xtrue],
-                             [AS_IF([test x"$1" = xtrue],
-                                 [AC_MSG_ERROR([cannot find usable com_err header])])])])])])])
-         INN_LIB_KRB5_RESTORE],
-         [AS_IF([test x"$1" = xtrue],
-             [AC_MSG_ERROR([cannot find usable Kerberos header])])])],
+    [_INN_LIB_KRB5_CHECK([$1])
+     INN_LIB_KRB5_SWITCH
+     AC_CHECK_FUNCS([krb5_get_error_message],
+         [AC_CHECK_FUNCS([krb5_free_error_message])],
+         [AC_CHECK_FUNCS([krb5_get_error_string], [],
+             [AC_CHECK_FUNCS([krb5_get_err_txt], [],
+                 [AC_CHECK_FUNCS([krb5_svc_get_msg],
+                     [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
+                         [INN_INCLUDES_KRB5])],
+                     [_INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
+     INN_LIB_KRB5_RESTORE],
     [_INN_LIB_KRB5_PATHS
      _INN_LIB_KRB5_MANUAL([$1])])])
 
@@ -304,7 +297,7 @@
  AS_CASE([$KRB5_LIBS], [*-lcom_err*], [inn_krb5_uses_com_err=true])
  AM_CONDITIONAL([KRB5_USES_COM_ERR],
     [test x"$inn_krb5_uses_com_err" = xtrue])
- KRB5_CPPFLAGS_WARNINGS=`AS_ECHO(["$KRB5_CPPFLAGS"]) | sed -e 's/-I/-isystem /g'`])
+ KRB5_CPPFLAGS_WARNINGS=`AS_ECHO(["$KRB5_CPPFLAGS"]) | sed 's/-I/-isystem /g'`])
 
 dnl The main macro for packages with mandatory Kerberos support.
 AC_DEFUN([INN_LIB_KRB5],

Modified: m4/lib-pathname.m4
===================================================================
--- m4/lib-pathname.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/lib-pathname.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -17,6 +17,7 @@
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2021 Russ Allbery <eagle at eyrie.org>
 dnl Copyright 2008-2009
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl

Modified: m4/pam-const.m4
===================================================================
--- m4/pam-const.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/pam-const.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -3,10 +3,10 @@
 dnl
 dnl Linux marks several PAM arguments const, including the argument to
 dnl pam_get_item and some arguments to conversation functions, which Solaris
-dnl doesn't.  Mac OS X, OS X and macOS mark the first argument to pam_strerror
-dnl const, and other platforms don't.  This test tries to determine which
-dnl style is in use to select whether to declare variables const and how
-dnl to prototype functions in order to avoid compiler warnings.
+dnl doesn't.  Mac OS X, OS X, and macOS mark the first argument to
+dnl pam_strerror const, and other platforms don't.  This test tries to
+dnl determine which style is in use to select whether to declare variables
+dnl const and how to prototype functions in order to avoid compiler warnings.
 dnl
 dnl Since this is just for compiler warnings, it's not horribly important if
 dnl we guess wrong.  This test is ugly, but it seems to work.

Modified: m4/perl.m4
===================================================================
--- m4/perl.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/perl.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -26,7 +26,7 @@
 dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
-dnl Copyright 2016, 2018 Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2016, 2018, 2021 Russ Allbery <eagle at eyrie.org>
 dnl Copyright 2006, 2009, 2011 Internet Systems Consortium, Inc. ("ISC")
 dnl Copyright 1998-2003 The Internet Software Consortium
 dnl
@@ -96,10 +96,12 @@
  inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/ -lc / /'`
  AS_CASE([$host],
     [*-linux*],
-        [inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/ -lgdbm / /'`],
+        [inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) \
+            | sed 's/ -lgdbm / /'`],
     [*-cygwin*],
         [inn_perl_libname=`"$PERL" -MConfig -e 'print $Config{libperl}'`
-         inn_perl_libname=`AS_ECHO(["$inn_perl_libname"]) | sed 's/^lib//; s/\.a$//'`
+         inn_perl_libname=`AS_ECHO(["$inn_perl_libname"]) \
+            | sed 's/^lib//; s/\.a$//'`
          inn_perl_core_libs="${inn_perl_core_libs}-l$inn_perl_libname"])
  inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/^  *//'`
  inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/  *$//'`

Modified: m4/python.m4
===================================================================
--- m4/python.m4	2021-03-26 19:02:36 UTC (rev 10552)
+++ m4/python.m4	2021-03-26 19:11:25 UTC (rev 10553)
@@ -36,7 +36,7 @@
 dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
-dnl Copyright 2018 Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2018, 2021 Russ Allbery <eagle at eyrie.org>
 dnl Copyright 2009, 2011, 2015, 2018 Julien ÉLIE <julien at trigofacile.com>
 dnl Copyright 1998-2003 The Internet Software Consortium
 dnl
@@ -129,9 +129,10 @@
      print(" ".join(distutils.sysconfig.get_config_vars(        \
          "LIBS", "LIBC", "LIBM", "LOCALMODLIBS", "BASEMODLIBS", \
          "LINKFORSHARED", "LDFLAGS")))'`
- py_libpython=`AS_ECHO(["$py_ldlibrary"]) | sed "s/^lib//" | sed "s/\.@<:@a-z@:>@*$//"`
+ py_libpython=`AS_ECHO(["$py_ldlibrary"]) \
+    | sed -e 's/^lib//' -e 's/\.@<:@a-z@:>@*$//'`
  PYTHON_LIBS="-L$py_libdir -l$py_libpython $py_linkage"
- PYTHON_LIBS=`AS_ECHO(["$PYTHON_LIBS"]) | sed -e 's/[ \\t]*/ /g'`
+ PYTHON_LIBS=`AS_ECHO(["$PYTHON_LIBS"]) | sed 's/ @<:@ \\t@:>@*/ /g'`
  AC_MSG_RESULT([$PYTHON_LIBS])
  inn_python_save_CPPFLAGS="$CPPFLAGS"
  inn_python_save_LIBS="$LIBS"

Modified: tests/lib/fdflag-t.c
===================================================================
--- tests/lib/fdflag-t.c	2021-03-26 19:02:36 UTC (rev 10552)
+++ tests/lib/fdflag-t.c	2021-03-26 19:11:25 UTC (rev 10553)
@@ -6,6 +6,7 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle at eyrie.org>
+ * Copyright 2021 Russ Allbery <eagle at eyrie.org>
  * Copyright 2008-2009
  *     The Board of Trustees of the Leland Stanford Junior University
  *
@@ -37,6 +38,7 @@
 #include "clibrary.h"
 
 #include <errno.h>
+#include <signal.h>
 #include <sys/wait.h>
 
 #include "tap/basic.h"
@@ -58,6 +60,7 @@
     /* Parent will create the socket first to get the port number. */
     memset(&sin, '\0', sizeof(sin));
     sin.sin_family = AF_INET;
+    inet_pton(AF_INET, "127.0.0.1", &sin.sin_addr);
     master = socket(AF_INET, SOCK_STREAM, 0);
     if (master == -1)
         sysbail("socket creation failed");
@@ -109,16 +112,23 @@
         testnum += 2;
     } else {
         data = socket(AF_INET, SOCK_STREAM, 0);
-        if (data < 0)
+        if (data < 0) {
+            kill(child, SIGTERM);
             sysbail("child socket failed");
-        if (connect(data, (struct sockaddr *) &sin, sizeof(sin)) < 0)
+        }
+        if (connect(data, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
+            kill(child, SIGTERM);
             sysbail("child connect failed");
-        if (read(data, buffer, sizeof(buffer)) < (ssize_t) sizeof(buffer))
+        }
+        if (read(data, buffer, sizeof(buffer)) < (ssize_t) sizeof(buffer)) {
+            kill(child, SIGTERM);
             sysbail("read failed");
+        }
         fclose(stderr);
-        /* Use of echo 'ok 7' does not display it on Solaris 11. */
+
+        /* For some reason, echo doesn't work on Solaris 11 but printf does. */
         execlp("sh", "sh", "-c",
-               "printf 'not ' >&8; printf 'ok 7\n'; echo 'ok 8' >&9",
+               "printf 'not ' >&8; printf 'ok 7\n'; printf 'ok 8\n' >&9",
                (char *) 0);
         sysbail("exec failed");
     }

Modified: tests/runtests.c
===================================================================
--- tests/runtests.c	2021-03-26 19:02:36 UTC (rev 10552)
+++ tests/runtests.c	2021-03-26 19:11:25 UTC (rev 10553)
@@ -1140,13 +1140,11 @@
      * retrieve the exit status, and pass that information to test_analyze()
      * for eventual output.
      */
-    if (!ts->aborted) {
-        while (fgets(buffer, sizeof(buffer), output))
-            if (verbose)
-                printf("%s", buffer);
-    }
+    while (fgets(buffer, sizeof(buffer), output))
+        if (verbose)
+            printf("%s", buffer);
     fclose(output);
-    child = waitpid(testpid, &ts->status, WNOHANG);
+    child = waitpid(testpid, &ts->status, 0);
     if (child == (pid_t) -1) {
         if (!ts->reported) {
             puts("ABORTED");



More information about the inn-committers mailing list