aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2020-05-17 17:05:30 -0700
committerRuss Allbery <eagle@eyrie.org>2020-05-17 17:05:30 -0700
commitc138111a3c27863308b6552a5527a9e821a3dc11 (patch)
treefe3c16462bf0213708f20d251a63e5b9bbf2d23f /m4
parentccfbd34d597318215b979338c4cb5d7e4a3f0d6f (diff)
Update to rra-c-util 8.2 and C TAP Harness 4.7
Update to rra-c-util 8.2: * Implement explicit_bzero with memset if it is not available. * Reformat all C source using clang-format 10. * Work around Test::Strict not skipping .git directories. * Fix warnings with perltidy 20190601 and Perl::Critic 1.134. * Fix warnings with Clang 10, GCC 10, and the Clang static analyzer. Update to C TAP Harness 4.7: * Fix warnings with GCC 10. * Reformat all C source using clang-format 10. * Fixed malloc error checking in bstrndup.
Diffstat (limited to 'm4')
-rw-r--r--m4/cc-flags.m46
-rw-r--r--m4/gssapi.m43
-rw-r--r--m4/krb5.m438
3 files changed, 23 insertions, 24 deletions
diff --git a/m4/cc-flags.m4 b/m4/cc-flags.m4
index 8a5aa8a..9a749f7 100644
--- a/m4/cc-flags.m4
+++ b/m4/cc-flags.m4
@@ -14,7 +14,7 @@ dnl
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@eyrie.org>
+dnl Copyright 2016-2020 Russ Allbery <eagle@eyrie.org>
dnl Copyright 2006, 2009, 2016
dnl by Internet Systems Consortium, Inc. ("ISC")
dnl
@@ -36,7 +36,7 @@ dnl Used to build the result cache name.
AC_DEFUN([_RRA_PROG_CC_FLAG_CACHE],
[translit([rra_cv_compiler_c_$1], [-=+], [___])])
-dnl Check whether a given flag is supported by the complier.
+dnl Check whether a given flag is supported by the compiler.
AC_DEFUN([RRA_PROG_CC_FLAG],
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING([if $CC supports $1])
@@ -61,7 +61,7 @@ dnl
dnl -Wsign-conversion Too many fiddly changes for the benefit
dnl -Wstack-protector Too many false positives from small buffers
dnl
-dnl Last checked against gcc 7.2.0 (2017-12-28). -D_FORTIFY_SOURCE=2 enables
+dnl Last checked against gcc 9.2.1 (2019-09-01). -D_FORTIFY_SOURCE=2 enables
dnl warn_unused_result attribute markings on glibc functions on Linux, which
dnl catches a few more issues. Add -O2 because gcc won't find some warnings
dnl without optimization turned on.
diff --git a/m4/gssapi.m4 b/m4/gssapi.m4
index 5828b1b..462111b 100644
--- a/m4/gssapi.m4
+++ b/m4/gssapi.m4
@@ -12,9 +12,6 @@ dnl RRA_LIB_GSSAPI_SWITCH to set CPPFLAGS, LDFLAGS, and LIBS to include the
dnl GSS-API libraries, saving the ecurrent values, and RRA_LIB_GSSAPI_RESTORE
dnl to restore those settings to before the last RRA_LIB_GSSAPI_SWITCH.
dnl
-dnl Also provides RRA_INCLUDES_KRB5, which are the headers to include when
-dnl probing the Kerberos library properties.
-dnl
dnl Depends on RRA_KRB5_CONFIG, RRA_ENABLE_REDUCED_DEPENDS, and
dnl RRA_SET_LDFLAGS.
dnl
diff --git a/m4/krb5.m4 b/m4/krb5.m4
index 8d9db43..617c27b 100644
--- a/m4/krb5.m4
+++ b/m4/krb5.m4
@@ -50,6 +50,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 Written by Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2018 Russ Allbery <eagle@eyrie.org>
dnl Copyright 2005-2011, 2013-2014
dnl The Board of Trustees of the Leland Stanford Junior University
dnl
@@ -139,26 +140,27 @@ dnl linkage. The single argument, if true, says to fail if Kerberos could not
dnl be found.
AC_DEFUN([_RRA_LIB_KRB5_REDUCED],
[RRA_LIB_KRB5_SWITCH
- AC_CHECK_LIB([krb5], [krb5_init_context], [KRB5_LIBS="-lkrb5"],
+ AC_CHECK_LIB([krb5], [krb5_init_context],
+ [KRB5_LIBS="-lkrb5"
+ LIBS="$KRB5_LIBS $LIBS"
+ _RRA_LIB_KRB5_CHECK_HEADER_KRB5
+ 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], [], [],
+ [RRA_INCLUDES_KRB5])],
+ [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=""])])
+ _RRA_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])],
[AS_IF([test x"$1" = xtrue],
[AC_MSG_ERROR([cannot find usable Kerberos library])])])
- LIBS="$KRB5_LIBS $LIBS"
- _RRA_LIB_KRB5_CHECK_HEADER_KRB5
- 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], [], [],
- [RRA_INCLUDES_KRB5])],
- [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=""])])
- _RRA_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
RRA_LIB_KRB5_RESTORE])
dnl Does the appropriate library checks for Kerberos linkage when we don't