Remove static from declaration of com_err_hook
authorSam Hartman <hartmans@mit.edu>
Sat, 1 Mar 1997 16:57:36 +0000 (16:57 +0000)
committerSam Hartman <hartmans@mit.edu>
Sat, 1 Mar 1997 16:57:36 +0000 (16:57 +0000)
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
src/util/et/com_err.c

index 085a63af3f00ee7cb27dc5ad723d25d216c67188..6b47675c66055cfb8f56bab41e22681ba9163655 100644 (file)
@@ -1,3 +1,7 @@
+Sat Mar  1 11:54:02 1997  Sam Hartman  <hartmans@luminous.MIT.EDU>
+
+       * 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  <basch@lehman.com>
 
        * Makefile.in: Move list file construction to win-post.in
index af86d4924a3081736838fe51062d8ccd4ef2eba2..9976fc55a4606b1336824ba9ea4ae55c967966aa 100644 (file)
@@ -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);
 }