Seems my configure hack overlooked some auto-conf magic side-effects.
This moves most squid compat hacks into squid_compat.h for now.
Really fixes the current build issues in squid_kerb_auth with Squid.
EXTRA_DIST += $(SPNEGO_SOURCE)
if HAVE_SPNEGO
-squid_kerb_auth_SOURCES = squid_kerb_auth.c base64.c base64.h
-squid_kerb_auth_test_SOURCES = squid_kerb_auth_test.c base64.c base64.h
+squid_kerb_auth_SOURCES = squid_kerb_auth.c base64.c base64.h squid_compat.h
+squid_kerb_auth_test_SOURCES = squid_kerb_auth_test.c base64.c base64.h squid_compat.h
else
-squid_kerb_auth_SOURCES = squid_kerb_auth.c base64.c base64.h $(SPNEGO_SOURCE)
+squid_kerb_auth_SOURCES = squid_kerb_auth.c base64.c base64.h $(SPNEGO_SOURCE) squid_compat.h
INCLUDES = -Ispnegohelp
-squid_kerb_auth_test_SOURCES = squid_kerb_auth_test.c base64.c base64.h
+squid_kerb_auth_test_SOURCES = squid_kerb_auth_test.c base64.c base64.h squdi_compat.h
endif
#undef HAVE_SQUID
#if HAVE_SQUID
-#include "config.h"
- /* We want the Squid type and library definitions without the package ones */
-#undef VERSION
-#undef PACKAGE
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_VERSION
+#include "squid_compat.h"
#endif /* HAVE_SQUID */
])
AH_BOTTOM([
--- /dev/null
+#ifndef SQUID__HELPERS_NEGOTIATE_AUTH_SQUID_KERB_AUTH_SQUID_COMPAT_H
+#define SQUID__HELPERS_NEGOTIATE_AUTH_SQUID_KERB_AUTH_SQUID_COMPAT_H
+
+/*
+ * We use a HAVE_SQUID define to override ther Squid-specific package
+ * definitions for their includes.
+ * AYJ: This whole bit needs re-working when compat.h exists.
+ * We will only need the compat.h and its library from squid.
+ */
+
+#if HAVE_SQUID
+
+#include "config.h"
+
+ /* We want the Squid type and library definitions without the package ones */
+#undef VERSION
+#undef PACKAGE
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+#endif /* HAVE_SQUID */
+
+#endif /* SQUID__HELPERS_NEGOTIATE_AUTH_SQUID_KERB_AUTH_SQUID_COMPAT_H */
gettimeofday(&now, NULL);
if (now.tv_sec != last_t) {
- tm = localtime(&now.tv_sec);
+ // FreeBSD defines tv_sec as long in non-ARM systems with a TODO note
+ time_t tmp = now.tv_sec;
+ tm = localtime(&tmp);
strftime(buf, 127, "%Y/%m/%d %H:%M:%S", tm);
last_t = now.tv_sec;
}