From: Theodore Tso Date: Tue, 18 Mar 1997 20:08:48 +0000 (+0000) Subject: Add 'extern "C"' for C++ compatibility; also check for __cplusplus X-Git-Tag: krb5-1.1-beta1~1186 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=78b51aea4f51c6fc8a79001144fa86a241f96def;p=krb5.git Add 'extern "C"' for C++ compatibility; also check for __cplusplus since some C++ compilers don't set __STDC__ git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10009 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 086fad587..e886e3a88 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 18 15:07:40 1997 Theodore Ts'o + + * com_err.h: Add 'extern "C"' for C++ compatibility; also check for + __cplusplus since some C++ compilers don't set __STDC__ + Mon Mar 3 14:57:35 1997 Ezra Peisach * error_message.c: Don't declare sys_nerr on Macintosh. diff --git a/src/util/et/com_err.h b/src/util/et/com_err.h index b425c8023..26c673b6f 100644 --- a/src/util/et/com_err.h +++ b/src/util/et/com_err.h @@ -36,7 +36,7 @@ #define NEAR #endif -#if defined(__STDC__) || defined(_MSDOS) || defined(_WIN32) || defined(_MACINTOSH) +#if defined(__STDC__) || defined(__cplusplus) || defined(_MSDOS) || defined(_WIN32) || defined(_MACINTOSH) /* End-user programs may need this -- oh well */ #ifndef HAVE_STDARG_H @@ -68,6 +68,10 @@ struct error_table { unsigned int n_msgs; }; +#ifdef __cplusplus +#extern "C" { +#endif + KRB5_DLLIMP extern void KRB5_CALLCONV_C com_err ET_STDARG_P((const char FAR *, errcode_t, const char FAR *, ...)); KRB5_DLLIMP extern void KRB5_CALLCONV com_err_va @@ -93,5 +97,9 @@ extern et_old_error_hook_func reset_com_err_hook ET_P((void)); #endif +#ifdef __cplusplus +} +#endif + #define __COM_ERR_H #endif /* ! defined(__COM_ERR_H) */