krb5.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_COMPAT_KRB5_H
10#define SQUID_COMPAT_KRB5_H
11
12/*
13 * The Kerberos library krb5.h header file has various major
14 * bugs in some implementations:
15 *
16 * - MacOS marks as deprecated the POSIX compatible APIs.
17 * Apparently to encourage code to use their internal APIs.
18 *
19 * - Heimdal may lack the extern "C" syntax for building in C++
20 *
21 * - Solaris incorrectly implements its own the extern "C" replacement
22 * macros and as a result krb5.h contains a trailing '}'.
23 * see http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6837512
24 *
25 * This file exists to fix those issues the best we can and to
26 * ensure the logic is identical in Squid code, Squid helpers,
27 * and autoconf tests. See acinclude/krb5.h for the latter.
28 */
29
30#if HAVE_KRB5_H
31# if USE_APPLE_KRB5
32# define KERBEROS_APPLE_DEPRECATED(x)
33# endif
34# if HAVE_BROKEN_HEIMDAL_KRB5_H && defined(__cplusplus)
35extern "C" {
36# include <krb5.h>
37}
38# elif HAVE_BROKEN_SOLARIS_KRB5_H && defined(__cplusplus)
39# define KRB5INT_BEGIN_DECLS extern "C" {
40# define KRB5INT_END_DECLS
41extern "C" {
42# include <krb5.h>
43 /* broken Solaris krb5.h contains the closing } */
44# else
45# include <krb5.h>
46# endif
47#endif /* HAVE_KRB5_H */
48
49#endif /* _SQUID__COMPAT_KRB5_H */

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors