From: Tom Yu Date: Sat, 31 Aug 1996 03:35:09 +0000 (+0000) Subject: * internal.h: #ifdef NEED_SYS_ERRLIST -> #ifdef X-Git-Tag: krb5-1.0-beta7~71 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b2d053087214a3e31cc11d956cb31bc9c1028ad;p=krb5.git * internal.h: #ifdef NEED_SYS_ERRLIST -> #ifdef SYS_ERRLIST_DECLARED for sanity's sake. * error_message.c: cpp symbol police: HAS_FOO -> HAVE_FOO * configure.in: Fix up check for strerror; use autoconf conventions git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9017 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 233b5b9d7..a08671018 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,13 @@ +Fri Aug 30 22:55:14 1996 Tom Yu + + * internal.h: #ifdef NEED_SYS_ERRLIST -> #ifdef + SYS_ERRLIST_DECLARED for sanity's sake. + + * error_message.c: cpp symbol police: HAS_FOO -> HAVE_FOO + + * configure.in: Fix up check for strerror; use autoconf + conventions + Wed Jun 12 12:10:59 1996 Theodore Ts'o * error_table.h: For Win32, define away FAR and NEAR. diff --git a/src/util/et/configure.in b/src/util/et/configure.in index 090956566..7b0cf00f7 100644 --- a/src/util/et/configure.in +++ b/src/util/et/configure.in @@ -20,7 +20,7 @@ if test $krb5_cv_decl_perror = yes; then AC_DEFINE(HDR_HAS_PERROR) fi dnl -AC_FUNC_CHECK(strerror,AC_DEFINE(HAS_STRERROR)) +AC_CHECK_FUNCS(strerror) AC_HEADER_STDARG AC_HAVE_HEADERS(stdlib.h) CopySrcHeader(com_err.h,$(BUILDTOP)/include) diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c index 88997b91a..a3c057824 100644 --- a/src/util/et/error_message.c +++ b/src/util/et/error_message.c @@ -39,7 +39,7 @@ long code; char *cp; #if defined(_MSDOS) || defined(_WIN32) -#define HAS_STRERROR 1 +#define HAVE_STRERROR 1 /* ** Winsock defines errors in the range 10000-10100. These are equivalent ** to 10000 plus the Berkeley error numbers. @@ -58,21 +58,21 @@ long code; offset = (int) l_offset; table_num = code - l_offset; if (!table_num) { -#ifdef HAS_STRERROR +#ifdef HAVE_STRERROR cp = strerror(offset); if (cp) return cp; goto oops; #else -#ifdef HAS_SYSERRLIST +#ifdef HAVE_SYS_ERRLIST if (offset < sys_nerr) return(sys_errlist[offset]); else goto oops; #else goto oops; -#endif /* HAS_SYSERRLIST */ -#endif /* HAS_STRERROR */ +#endif /* HAVE_SYS_ERRLIST */ +#endif /* HAVE_STRERROR */ } for (et = _et_list; et; et = et->next) { if (et->table->base == table_num) { diff --git a/src/util/et/internal.h b/src/util/et/internal.h index f0c0e5723..c786a33a5 100644 --- a/src/util/et/internal.h +++ b/src/util/et/internal.h @@ -5,7 +5,7 @@ #include -#ifdef NEED_SYS_ERRLIST +#ifndef SYS_ERRLIST_DECLARED extern char const * const sys_errlist[]; extern const int sys_nerr; #endif