From: Tom Yu Date: Wed, 3 Apr 2002 02:13:34 +0000 (+0000) Subject: * krb5.hin: Default to KRB5_DEPRECATED=1, allowing compiler X-Git-Tag: krb5-1.3-alpha1~799 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=11cc83ce8efb1944603c74e22056aced26347a2c;p=krb5.git * krb5.hin: Default to KRB5_DEPRECATED=1, allowing compiler command line to override. Hide some struct definitions. Use KRB5INT_BEGIN_DECLS and KRB5INT_END_DECLS to deal with C++ function declarations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14329 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index e23ea4c58..25509b2fc 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,10 @@ +2002-04-02 Tom Yu + + * krb5.hin: Default to KRB5_DEPRECATED=1, allowing compiler + command line to override. Hide some struct definitions. Use + KRB5INT_BEGIN_DECLS and KRB5INT_END_DECLS to deal with C++ + function declarations. + 2002-04-01 Tom Yu * krb5.hin: Move a whole bunch of stuff under KRB5_DEPRECATED or diff --git a/src/include/krb5.hin b/src/include/krb5.hin index f792f9450..656ec85ec 100644 --- a/src/include/krb5.hin +++ b/src/include/krb5.hin @@ -56,6 +56,10 @@ #ifndef KRB5_GENERAL__ #define KRB5_GENERAL__ +#ifndef KRB5_DEPRECATED +#define KRB5_DEPRECATED 1 /* Expose deprecated things for now. */ +#endif + #if defined(_WIN32) || defined(macintosh) #include /* Macintoh CFM-68K magic incantation */ @@ -93,10 +97,16 @@ * end "error_def.h" */ -#ifdef __cplusplus -extern "C" { +#if defined(__cplusplus) && !defined(KRB5INT_BEGIN_DECLS) +#define KRB5INT_BEGIN_DECLS extern "C" { +#define KRB5INT_END_DECLS } +#else +#define KRB5INT_BEGIN_DECLS +#define KRB5INT_END_DECLS #endif +KRB5INT_BEGIN_DECLS + /* * begin wordsize.h */ @@ -1199,6 +1209,7 @@ krb5_cc_get_type (krb5_context context, krb5_ccache cache); struct krb5_rc_st; typedef struct krb5_rc_st *krb5_rcache; +#if KRB5_PRIVATE typedef struct _krb5_donot_replay { krb5_magic magic; char *server; /* null-terminated */ @@ -1207,7 +1218,6 @@ typedef struct _krb5_donot_replay { krb5_timestamp ctime; } krb5_donot_replay; -#if KRB5_PRIVATE krb5_error_code krb5_rc_default (krb5_context, krb5_rcache *); @@ -1271,13 +1281,17 @@ typedef struct krb5_keytab_entry_st { krb5_keyblock key; /* the secret key */ } krb5_keytab_entry; - +#if KRB5_PRIVATE struct _krb5_kt_ops; -typedef struct _krb5_kt { +typedef struct _krb5_kt { /* should move into k5-int.h */ krb5_magic magic; struct _krb5_kt_ops *ops; krb5_pointer data; } *krb5_keytab; +#else +struct _krb5_kt; +typedef struct _krb5_kt *krb5_keytab; +#endif char * KRB5_CALLCONV krb5_kt_get_type (krb5_context, krb5_keytab keytab); @@ -2468,9 +2482,7 @@ typedef krb5_int32 krb5_prompt_type; krb5_prompt_type* KRB5_CALLCONV krb5_get_prompt_types (krb5_context context); -#ifdef __cplusplus -} -#endif +KRB5INT_END_DECLS /* Macintoh CFM-68K magic incantation */ #if defined(macintosh) && defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)