From e273e03d6334f890dfa249f50a2ee2bc4bac46a4 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 1 Mar 1997 16:57:36 +0000 Subject: [PATCH] Remove static from declaration of com_err_hook to work around NetBSD/Gcc bug. [383] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9991 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/et/ChangeLog | 4 ++++ src/util/et/com_err.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 085a63af3..6b47675c6 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,7 @@ +Sat Mar 1 11:54:02 1997 Sam Hartman + + * com_err.c: Make com_err_hook global instead of static to work around either NetBSD or Gcc bug.[383] + Sat Feb 22 12:18:47 1997 Richard Basch * Makefile.in: Move list file construction to win-post.in diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c index af86d4924..9976fc55a 100644 --- a/src/util/et/com_err.c +++ b/src/util/et/com_err.c @@ -30,7 +30,7 @@ static void MacMessageBox(errbuf); #endif -static et_old_error_hook_func com_err_hook = 0; + et_old_error_hook_func com_err_hook = 0; static void default_com_err_proc ET_P((const char FAR *whoami, errcode_t code, @@ -98,10 +98,11 @@ KRB5_DLLIMP void KRB5_CALLCONV com_err_va(whoami, code, fmt, ap) const char FAR *fmt; va_list ap; { - if (!com_err_hook) + et_old_error_hook_func cef = com_err_hook; + if (!cef) default_com_err_proc(whoami, code, fmt, ap); else - (*com_err_hook)(whoami, code, fmt, ap); + (cef)(whoami, code, fmt, ap); } -- 2.26.2