From 6c60a73fb24281a7da0c4d7d7ae86710f58869f7 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sat, 13 Jul 2002 00:18:10 +0000 Subject: [PATCH] * gssapi_generic.h: allow inclusion by C++ * gssapi.hin: Conditionalized pragmas for Metrowerks * gssapi.hin: Added check for CFM compiles. Removed dependency on PRAGMA_* macros. Moved check struct alignment check before struct declarations. * disp_com_err_status.c, gssapi.hin, gssapi_generic.h: Updated Mac OS X headers to new framework layout * gssapi_generic.h: Fixed check for Mac OS X includes. [pullups from 1-2-2-branch] * gssapiP_generic.h: use "" include for krb5.h [pullup from 1-2-2-branch] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14635 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/generic/ChangeLog | 22 ++++++++++++ src/lib/gssapi/generic/disp_com_err_status.c | 5 +++ src/lib/gssapi/generic/gssapi.hin | 36 +++++++++++++++----- src/lib/gssapi/generic/gssapiP_generic.h | 2 +- src/lib/gssapi/generic/gssapi_generic.h | 16 +++++++-- 5 files changed, 69 insertions(+), 12 deletions(-) diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index 9bdc92a57..465ca4ccb 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,25 @@ +2002-07-12 Alexandra Ellwood + + * gssapi_generic.h: allow inclusion by C++ + + * gssapi.hin: Conditionalized pragmas for Metrowerks + + * gssapi.hin: Added check for CFM compiles. Removed dependency on + PRAGMA_* macros. Moved check struct alignment check before struct + declarations. + + * disp_com_err_status.c, gssapi.hin, gssapi_generic.h: + Updated Mac OS X headers to new framework layout + + * gssapi_generic.h: Fixed check for Mac OS X includes. + + [pullups from 1-2-2-branch] + +2002-07-12 Miro Jurisic + + * gssapiP_generic.h: use "" include for krb5.h + [pullup from 1-2-2-branch] + 2001-10-20 Ken Raeburn * gssapiP_generic.h (g_*): For every g_ function declared here, diff --git a/src/lib/gssapi/generic/disp_com_err_status.c b/src/lib/gssapi/generic/disp_com_err_status.c index c4db91375..71c75056e 100644 --- a/src/lib/gssapi/generic/disp_com_err_status.c +++ b/src/lib/gssapi/generic/disp_com_err_status.c @@ -25,7 +25,12 @@ */ #include "gssapiP_generic.h" + +#if TARGET_OS_MAC +#include +#else #include "com_err.h" +#endif /* XXXX internationalization!! */ diff --git a/src/lib/gssapi/generic/gssapi.hin b/src/lib/gssapi/generic/gssapi.hin index 9aaf563af..94c5cb186 100644 --- a/src/lib/gssapi/generic/gssapi.hin +++ b/src/lib/gssapi/generic/gssapi.hin @@ -27,13 +27,27 @@ * Determine platform-dependent configuration. */ -#if defined(_WIN32) || defined(macintosh) -#include +#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) +# include +# if TARGET_RT_MAC_CFM +# error "Use KfM 4.0 SDK headers for CFM compilation." +# endif +#endif -/* Macintoh CFM-68K magic incantation */ -#if defined(macintosh) && defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -#pragma import on +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#if TARGET_OS_MAC +# if defined(__MWERKS__) +# pragma import on +# pragma enumsalwaysint on +# endif +# pragma options align=mac68k #endif + +#if defined(_MSDOS) || defined(_WIN32) +#include #endif #ifndef KRB5_CALLCONV @@ -319,10 +333,6 @@ typedef int gss_cred_usage_t; # define GSS_DLLIMP #endif -#ifdef __cplusplus -extern "C" { -#endif - /* Reserved static storage for GSS_oids. Comments are quotes from RFC 2744. * * The implementation must reserve static storage for a @@ -772,6 +782,14 @@ OM_uint32 KRB5_CALLCONV gss_canonicalize_name gss_name_t * /* output_name */ ); +#if TARGET_OS_MAC +# if defined(__MWERKS__) +# pragma enumsalwaysint reset +# pragma import reset +# endif +# pragma options align=reset +#endif + #ifdef __cplusplus } #endif diff --git a/src/lib/gssapi/generic/gssapiP_generic.h b/src/lib/gssapi/generic/gssapiP_generic.h index fe69fd2fb..81049a506 100644 --- a/src/lib/gssapi/generic/gssapiP_generic.h +++ b/src/lib/gssapi/generic/gssapiP_generic.h @@ -28,7 +28,7 @@ */ #if (defined(_WIN32) || defined(macintosh)) -#include +#include "k5-int.h" #else #ifdef HAVE_STDLIB_H #include diff --git a/src/lib/gssapi/generic/gssapi_generic.h b/src/lib/gssapi/generic/gssapi_generic.h index 2a0c59fdd..d8c7ec66a 100644 --- a/src/lib/gssapi/generic/gssapi_generic.h +++ b/src/lib/gssapi/generic/gssapi_generic.h @@ -27,12 +27,22 @@ * $Id$ */ -#if defined(__MWERKS__) || defined(applec) || defined(THINK_C) -#include +#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) +#include #else #include #endif +#if defined(__cplusplus) && !defined(GSSAPIGENERIC_BEGIN_DECLS) +#define GSSAPIGENERIC_BEGIN_DECLS extern "C" { +#define GSSAPIGENERIC_END_DECLS } +#else +#define GSSAPIGENERIC_BEGIN_DECLS +#define GSSAPIGENERIC_END_DECLS +#endif + +GSSAPIGENERIC_BEGIN_DECLS + /* Deprecated MIT krb5 oid names provided for compatibility. * The correct oids (GSS_C_NT_USER_NAME, etc) from rfc 2744 * are defined in gssapi.h. */ @@ -44,4 +54,6 @@ extern gss_OID gss_nt_service_name_v2; GSS_DLLIMP extern gss_OID gss_nt_service_name; extern gss_OID gss_nt_exported_name; +GSSAPIGENERIC_END_DECLS + #endif /* _GSSAPI_GENERIC_H_ */ -- 2.26.2