* 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
+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 <tytso@dcl>
* com_err.c (default_com_err_proc): Fixed breakage introduced by
CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE)
-LDFLAGS = -g
SED = sed
##DOSBUILDTOP = ..\..
#
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. :-( )
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::
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)
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) {