From: Amos Jeffries Date: Tue, 23 Dec 2025 13:16:36 +0000 (+0000) Subject: Remove SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H macro (#2315) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33eb860bbc66e9fe3a7d97ae2a77b816aae20f46;p=thirdparty%2Fsquid.git Remove SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H macro (#2315) This was added for FreeBSD 7 issues which can not be replicated using the current FreeBSD 14. Heimdal package still lacks C++ wrappers, but this does not seem to be affecting any currently supported OS. If necessary this check can be restored with better details about how to replicate. --- diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 index d43a0e613a..61f44de94b 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 @@ -45,37 +45,6 @@ AC_DEFUN([SQUID_CHECK_SOLARIS_KRB5],[ ]) ]) -AC_DEFUN([SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H], [ - AC_CACHE_CHECK([for broken Heimdal krb5.h],squid_cv_broken_heimdal_krb5_h, [ - SQUID_STATE_SAVE(squid_krb5_heimdal_test) - CPPFLAGS="-I${srcdir:-.} $CPPFLAGS" - AC_LINK_IFELSE([AC_LANG_SOURCE([[ -#include -int -main(void) -{ - krb5_context context; - krb5_init_context(&context); - return 0; -} -]])], [ squid_cv_broken_heimdal_krb5_h=no ], [ - AC_LINK_IFELSE([AC_LANG_SOURCE([[ -#define HAVE_BROKEN_HEIMDAL_KRB5_H 1 -#include "compat/krb5.h" -int -main(void) -{ - krb5_context context; - krb5_init_context(&context); - return 0; -} -]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ]) - ]) - SQUID_STATE_ROLLBACK(squid_krb5_heimdal_test) - ]) - SQUID_DEFINE_BOOL(HAVE_BROKEN_HEIMDAL_KRB5_H,$squid_cv_broken_heimdal_krb5_h,[Heimdal krb5.h is broken for C++]) -]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H - dnl check whether the kerberos context has a memory cache. Sets dnl squid_cv_memory_cache if that's the case. AC_DEFUN([SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE],[ diff --git a/compat/krb5.h b/compat/krb5.h index 28e5d4239a..654eb4fbec 100644 --- a/compat/krb5.h +++ b/compat/krb5.h @@ -10,14 +10,11 @@ #define SQUID_COMPAT_KRB5_H /* - * The Kerberos library krb5.h header file has various major - * bugs in some implementations: + * The Kerberos library has various major bugs. * * - MacOS marks as deprecated the POSIX compatible APIs. * Apparently to encourage code to use their internal APIs. * - * - Heimdal may lack the extern "C" syntax for building in C++ - * * This file exists to fix those issues the best we can and to * ensure the logic is identical in Squid code, Squid helpers, * and autoconf tests. See acinclude/krb5.h for the latter. @@ -27,13 +24,7 @@ # if USE_APPLE_KRB5 # define KERBEROS_APPLE_DEPRECATED(x) # endif -# if HAVE_BROKEN_HEIMDAL_KRB5_H && defined(__cplusplus) -extern "C" { -# include -} -# else -# include -# endif +#include #endif /* HAVE_KRB5_H */ #endif /* SQUID_COMPAT_KRB5_H */ diff --git a/configure.ac b/configure.ac index cc7856580d..f08ba446dc 100644 --- a/configure.ac +++ b/configure.ac @@ -1177,7 +1177,6 @@ SQUID_CHECK_LIB_WORKS(heimdal-krb5,[ AC_CHECK_HEADERS(krb5.h com_err.h et/com_err.h) LIBS="$LIBHEIMDAL_KRB5_PATH $LIBHEIMDAL_KRB5_LIBS $LIBS" - SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H SQUID_CHECK_KRB5_FUNCS ]) ])