* gssapi_generic.h: allow inclusion by C++
authorTom Yu <tlyu@mit.edu>
Sat, 13 Jul 2002 00:18:10 +0000 (00:18 +0000)
committerTom Yu <tlyu@mit.edu>
Sat, 13 Jul 2002 00:18:10 +0000 (00:18 +0000)
* 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
src/lib/gssapi/generic/disp_com_err_status.c
src/lib/gssapi/generic/gssapi.hin
src/lib/gssapi/generic/gssapiP_generic.h
src/lib/gssapi/generic/gssapi_generic.h

index 9bdc92a57860dee8805dd8a18c11f4f177a611b4..465ca4ccb62a11c3f8dc9949859d6a7ef1e3f8f1 100644 (file)
@@ -1,3 +1,25 @@
+2002-07-12  Alexandra Ellwood <lxs@mit.edu>
+
+       * 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  <meeroh@mit.edu>
+
+       * gssapiP_generic.h: use "" include for krb5.h
+       [pullup from 1-2-2-branch]
+
 2001-10-20  Ken Raeburn  <raeburn@mit.edu>
 
        * gssapiP_generic.h (g_*): For every g_ function declared here,
index c4db91375c447a22313d8ffd02139fb65b6ab70c..71c75056e4998904ab82b9f96ed6427019cc45dc 100644 (file)
  */
 
 #include "gssapiP_generic.h"
+
+#if TARGET_OS_MAC
+#include <Kerberos/com_err.h>
+#else
 #include "com_err.h"
+#endif
 
 /* XXXX internationalization!! */
 
index 9aaf563afbc1b903406ae5c422780c15828fa468..94c5cb186b73e8125ac505309de560bc3e079fcf 100644 (file)
  * Determine platform-dependent configuration.
  */
 
-#if defined(_WIN32) || defined(macintosh)
-#include <win-mac.h>
+#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
+#      include <TargetConditionals.h>
+#      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 <win-mac.h>
 #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
index fe69fd2fbdf557a70106f8c8de797380811357f9..81049a50649c981106d1f379b1e39332abfc35b1 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #if (defined(_WIN32) || defined(macintosh))
-#include <k5-int.h>
+#include "k5-int.h"
 #else
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
index 2a0c59fdd8a4c9e712f013af3d0a03dc023f7e89..d8c7ec66a63f3aeb3eb03b2817754be6955b46b1 100644 (file)
  * $Id$
  */
 
-#if defined(__MWERKS__) || defined(applec) || defined(THINK_C)
-#include <gssapi.h>
+#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
+#include <Kerberos/gssapi.h>
 #else
 #include <gssapi/gssapi.h>
 #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_ */