From: John Gilmore Date: Wed, 29 Mar 1995 16:58:10 +0000 (+0000) Subject: * Makefile.in: Fix up Mac makefile. X-Git-Tag: krb5-1.0-beta5~412 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7b589259134ced09c49cc5a2abd48f119e2e0dca;p=krb5.git * Makefile.in: Fix up Mac makefile. * error_message.c: For errno, use strerror if HAS_STRERROR. * configure.in: Define HAS_STRERROR. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5309 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 1a4fb36bc..dc7212715 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,9 @@ +Wed Mar 29 08:56:47 1995 John Gilmore (gnu at toad.com) + + * Makefile.in: Fix up Mac makefile. + * error_message.c: For errno, use strerror if HAS_STRERROR. + * configure.in: Define HAS_STRERROR. + Thu Mar 23 19:00:03 1995 Theodore Y. Ts'o * com_err.c (default_com_err_proc): Fixed breakage introduced by diff --git a/src/util/et/Makefile.in b/src/util/et/Makefile.in index 4e260db97..b449de2e1 100644 --- a/src/util/et/Makefile.in +++ b/src/util/et/Makefile.in @@ -1,5 +1,4 @@ CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE) -LDFLAGS = -g SED = sed ##DOSBUILDTOP = ..\.. @@ -47,8 +46,7 @@ com_err.o: com_err.c # all-unix:: compile_et includes - -all-mac:: compile_et includes +all-mac:: libcom_err.a # The real compile_et just isn't portable. (But then again, anything using # lex and yacc isn't portable by definition. :-( ) @@ -73,9 +71,7 @@ clean:: clean-$(WHAT) clean-unix:: $(RM) compile_et compile_et.o error_table.o - -clean-mac:: - $(RM) compile_et compile_et.o error_table.o +clean-mac:: clean-unix depend:: diff --git a/src/util/et/configure.in b/src/util/et/configure.in index 04a72e0aa..c59fc809c 100644 --- a/src/util/et/configure.in +++ b/src/util/et/configure.in @@ -21,6 +21,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_HEADERS(stdarg.h) 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 990d29238..b549a02bd 100644 --- a/src/util/et/error_message.c +++ b/src/util/et/error_message.c @@ -35,10 +35,14 @@ long code; offset = (int) l_offset; table_num = code - l_offset; if (!table_num) { +#ifdef HAS_STRERROR + return strerror (offset); +#else if (offset < sys_nerr) return(sys_errlist[offset]); else goto oops; +#endif } for (et = _et_list; et; et = et->next) { if (et->table->base == table_num) {