From 7ec2be521c5b644ce7f25a5508ad2398d4827ea3 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 13 Jul 1995 20:17:32 +0000 Subject: [PATCH] Clean up prototypes for error_message. I think we may need to insert a test to see if const works into com_err; it is still used in several places with non-ANSI compilers, and I had to insert a few more consts to get the AIX compiler in not-quite-ANSI mode to work git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6292 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/et/ChangeLog | 8 ++++++++ src/util/et/com_err.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 42a88c984..3ade86ecb 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,11 @@ +Thu Jul 13 15:40:56 1995 Sam Hartman + + * com_err.h: error_message should be const char * (as it is in + error_message.c), not char const * (as currently presented). + +Alspo, since error_message +ets declared const even on non-ansi compilers, set the return type that way so AIX cc doesn't barf. + Wed Jul 12 12:37:24 1995 Ezra Peisach * error_message.c: Do not include stdlib.h unless it exists diff --git a/src/util/et/com_err.h b/src/util/et/com_err.h index 05f0d04dc..31a5f9027 100644 --- a/src/util/et/com_err.h +++ b/src/util/et/com_err.h @@ -45,7 +45,7 @@ #if defined(__STDC__) || defined(_WINDOWS) /* ANSI C -- use prototypes etc */ extern void INTERFACE_C com_err (const char FAR *, long, const char FAR *, ...); -extern char const FAR * INTERFACE error_message (long); +extern const char FAR * INTERFACE error_message (long); extern void (*com_err_hook) (const char *, long, const char *, va_list); extern void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list))) (const char *, long, const char *, va_list); @@ -53,7 +53,7 @@ extern void (*reset_com_err_hook ()) (const char *, long, const char *, va_list) #else /* no prototypes */ extern void INTERFACE_C com_err (); -extern char * INTERFACE error_message (); +extern const char * INTERFACE error_message (); extern void (*com_err_hook) (); extern void (*set_com_err_hook ()) (); extern void (*reset_com_err_hook ()) (); -- 2.26.2