=== modified file 'acinclude/krb5.m4' --- acinclude/krb5.m4 2010-08-29 14:07:18 +0000 +++ acinclude/krb5.m4 2010-12-04 21:33:57 +0000 @@ -51,6 +51,42 @@ ]) dnl SQUID_CHECK_KRB5_SOLARIS_BROKEN_KRB5_H +AC_DEFUN([SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H], [ + AC_CACHE_CHECK([for broken Heimdal krb5.h],squid_cv_broken_heimdal_krb5_h, [ + AC_RUN_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_RUN_IFELSE([AC_LANG_SOURCE([[ +#if defined(__cplusplus) +extern "C" { +#endif +#include +#if defined(__cplusplus) +} +#endif +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 ]) + ]) + ]) +]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H + dnl check the max skew in the krb5 context, and sets squid_cv_max_skew_context AC_DEFUN([SQUID_CHECK_MAX_SKEW_IN_KRB5_CONTEXT],[ AC_CACHE_CHECK([for max_skew in struct krb5_context], @@ -195,7 +231,13 @@ KRB5INT_BEGIN_DECLS #endif #endif -#include +#if HAVE_BROKEN_HEIMDAL_KRB5_H +extern "C" { +#include +} +#else +#include +#endif #endif int === modified file 'configure.in' --- configure.in 2010-11-27 06:44:33 +0000 +++ configure.in 2010-12-04 21:31:00 +0000 @@ -353,7 +353,7 @@ SQUID_YESNO([$enableval], [unrecognized argument to --enable-debug-cbdata: $enableval]) ]) -SQUID_DEFINE_BOOL(USE_CBDATA_DEBUG,${enable_debug_cbdata:=no}, +SQUID_DEFINE_BOOL(CBDATA_DEBUG,${enable_debug_cbdata:=no}, [Enable support for cbdata debug information]) AC_MSG_NOTICE([cbdata debugging enabled: $enable_debug_cbdata]) @@ -770,13 +770,13 @@ fi ]) -AM_CONDITIONAL(ENABLE_DELAY_POOLS, false) +AM_CONDITIONAL(USE_DELAY_POOLS, false) AC_ARG_ENABLE(delay-pools, AS_HELP_STRING([--enable-delay-pools],[Enable delay pools to limit bandwidth usage]), [ if test "x$enableval" = "xyes" ; then AC_MSG_NOTICE([Delay pools enabled]) - AC_DEFINE([USE_DELAY_POOLS],1,[Traffic management via "delay pools".]) - AM_CONDITIONAL(ENABLE_DELAY_POOLS, true,) + AC_DEFINE([DELAY_POOLS],1,[Traffic management via "delay pools".]) + AM_CONDITIONAL(USE_DELAY_POOLS, true,) fi ]) @@ -1835,12 +1835,16 @@ SQUID_CHECK_KRB5_SOLARIS_BROKEN_KRB5_H if test "x$squid_cv_broken_krb5_h" = "xyes"; then - AC_DEFINE(HAVE_BROKEN_SOLARIS_KRB5_H, 1, [Define to 1 if krb5.h is broken for C++]) + AC_DEFINE(HAVE_BROKEN_SOLARIS_KRB5_H, 1, [Define to 1 if Solaris krb5.h is broken for C++]) AC_MSG_WARN([You have a broken Solaris system include.]) AC_MSG_WARN([Please see http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6837512]) AC_MSG_WARN([If you need Kerberos support you'll have to patch]) AC_MSG_WARN([your system. See contrib/solaris/solaris-krb5-include.patch]) fi + SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H + if test "x$squid_cv_broken_heimdal_krb5_h" = "xyes"; then + AC_DEFINE(HAVE_BROKEN_HEIMDAL_KRB5_H, 1, [Define to 1 if Heimdal krb5.h is broken for C++]) + fi AC_CHECK_HEADERS(krb5.h com_err.h et/com_err.h) ac_com_error_message=no === modified file 'helpers/external_acl/kerberos_ldap_group/support.h' --- helpers/external_acl/kerberos_ldap_group/support.h 2010-08-23 13:15:48 +0000 +++ helpers/external_acl/kerberos_ldap_group/support.h 2010-12-04 21:31:26 +0000 @@ -28,53 +28,49 @@ #include #endif -#if HAVE_HEIMDAL_KERBEROS #if HAVE_GSSAPI_GSSAPI_H #include #elif HAVE_GSSAPI_H #include #endif /* HAVE_GSSAPI_GSSAPI_H/HAVE_GSSAPI_H */ + +#if !HAVE_HEIMDAL_KERBEROS +#if HAVE_GSSAPI_GSSAPI_KRB5_H +#include +#endif +#if HAVE_GSSAPI_GSSAPI_GENERIC_H +#include +#endif +#if HAVE_GSSAPI_GSSAPI_EXT_H +#include +#endif +#endif + #if HAVE_KRB5_H #if HAVE_BROKEN_SOLARIS_KRB5_H -#warn "Warning! You have a broken Solaris fsystem header" +#warn "Warning! You have a broken Solaris system header" #warn "http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6837512" +#if defined(__cplusplus) +#define KRB5INT_BEGIN_DECLS extern "C" { +#define KRB5INT_END_DECLS +KRB5INT_BEGIN_DECLS +#endif #endif /* HAVE_BROKEN_SOLARIS_KRB5_H */ -#include +#if HAVE_BROKEN_HEIMDAL_KRB5_H +extern "C" { +#include +} +#else +#include +#endif #endif /* HAVE_KRB5_H */ + #if HAVE_COM_ERR_H #include -#else +#elif HAVE_HEIMDAL_KERBEROS #define error_message(code) krb5_get_err_text(kparam.context,code) #endif /* HAVE_COM_ERR_H */ -#else /*MIT */ -#ifdef HAVE_GSSAPI_GSSAPI_H -#include -#elif defined(HAVE_GSSAPI_H) -#include -#endif -#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H -#include -#endif -#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H -#include -#endif -#ifdef HAVE_GSSAPI_GSSAPI_EXT_H -#include -#endif -#ifdef HAVE_KRB5_H -#if HAVE_BROKEN_SOLARIS_KRB5_H -#if defined(__cplusplus) -#define KRB5INT_BEGIN_DECLS extern "C" { -#define KRB5INT_END_DECLS -KRB5INT_BEGIN_DECLS -#endif -#endif -#include -#endif -#ifdef HAVE_COM_ERR_H -#include -#endif -#endif + #ifndef gss_nt_service_name #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE #endif