From: Theodore Tso Date: Thu, 5 Oct 1995 22:00:40 +0000 (+0000) Subject: Fix logic if #ifdefs for HAVE_STRERROR and HAVE_SYS_ERRLIST. X-Git-Tag: krb5-1.0-beta6~937 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=abf9506bb65d53acec7e92120fe30814d40d130f;p=krb5.git Fix logic if #ifdefs for HAVE_STRERROR and HAVE_SYS_ERRLIST. strerror() is used in preference to sys_errlist(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6931 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index dd9418611..577d08536 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,9 @@ +Mon Oct 2 15:22:01 1995 Theodore Y. Ts'o + + * error_message.c (error_message): Fix logic if #ifdefs for + HAVE_STRERROR and HAVE_SYS_ERRLIST. strerror() is used in + preference to sys_errlist(). + Mon Oct 2 11:16:32 1995 Ezra Peisach * configure.in (V5_MAKE_SHARED_LIB): Add version number 0.1 for diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c index 1d5813674..4a7821c46 100644 --- a/src/util/et/error_message.c +++ b/src/util/et/error_message.c @@ -51,18 +51,21 @@ long code; offset = (int) l_offset; table_num = code - l_offset; if (!table_num) { -#ifdef HAS_SYSERRLIST #ifdef HAS_STRERROR - return strerror (offset); + cp = strerror(offset); + if (cp) + return cp; + goto oops; #else +#ifdef HAS_SYSERRLIST if (offset < sys_nerr) return(sys_errlist[offset]); else goto oops; -#endif #else goto oops; -#endif +#endif /* HAS_SYSERRLIST */ +#endif /* HAS_STRERROR */ } for (et = _et_list; et; et = et->next) { if (et->table->base == table_num) {