summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorKeith Vetter <keithv@fusion.com>1995-03-22 04:50:28 +0000
committerKeith Vetter <keithv@fusion.com>1995-03-22 04:50:28 +0000
commitccebf448033af149e77786d8c44fd16264019b78 (patch)
treeb72b2fb53e053cf41a03333d28f2fceccd08fedc /src/util
parenta032cfd48432fddf3e800b383253b17acd81b5ec (diff)
downloadkrb5-ccebf448033af149e77786d8c44fd16264019b78.tar.gz
krb5-ccebf448033af149e77786d8c44fd16264019b78.tar.xz
krb5-ccebf448033af149e77786d8c44fd16264019b78.zip
Fixed bugs in the com_err library so that it's callable from windows programs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5180 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/et/ChangeLog9
-rw-r--r--src/util/et/Makefile.in18
-rw-r--r--src/util/et/com_err.c6
-rw-r--r--src/util/et/com_err.h4
4 files changed, 28 insertions, 9 deletions
diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog
index 4c4966ff5..6a514a2fa 100644
--- a/src/util/et/ChangeLog
+++ b/src/util/et/ChangeLog
@@ -1,7 +1,10 @@
-Sat Mar 18 18:44:03 1995 John Gilmore (gnu at toad.com)
+Thu Mar 16 19:57:20 1995 Keith Vetter (keithv@fusion.com)
- * com_err.c, com_err.h: Use HAVE_STDARG_H, not STDARG_PROTOTYPES.
- * configure.in: Use AC_CHECK_HEADERS(stdarg.h), not CHECK_STDARG.
+ * com_err.c: added missing INTERFACE on a prototype.
+ * com_err.h: added _WINDOWS as an equivalent to __STDC__ since this
+ file gets included by windows programs in which __STDC__ isn't defined.
+ * makefile.in: added xxx-mac targets to mimic xxx-unix, and added
+ copying com_err.h to src\include for the PC.
Wed Mar 16 17:30:00 1995 Keith Vetter (keithv@fusion.com)
diff --git a/src/util/et/Makefile.in b/src/util/et/Makefile.in
index 57247c8a3..4e260db97 100644
--- a/src/util/et/Makefile.in
+++ b/src/util/et/Makefile.in
@@ -29,6 +29,7 @@ SRCS=$(CFILES)
all:: all-$(WHAT)
all-windows: com_err.obj error_message.obj et_name.obj
+ copy com_err.h $(BUILDTOP)\include
#
# what to build...
@@ -47,6 +48,8 @@ com_err.o: com_err.c
all-unix:: compile_et includes
+all-mac:: compile_et includes
+
# The real compile_et just isn't portable. (But then again, anything using
# lex and yacc isn't portable by definition. :-( )
#
@@ -71,6 +74,9 @@ 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
+
depend::
install:: com_err.h
@@ -89,6 +95,8 @@ install:: compile_et.1
## install_library_target(com_err,$(LIBOBJS),$(LINTFILES),)
all-unix:: libcom_err.a
+all-mac:: libcom_err.a
+
libcom_err.a: $(LIBOBJS)
$(ARCHIVE) $@ $(LIBOBJS)
$(RANLIB) $@
@@ -97,6 +105,10 @@ clean-unix::
$(RM) libcom_err.a
$(RM) $(LIBOBJS)
+clean-mac::
+ $(RM) libcom_err.a
+ $(RM) $(LIBOBJS)
+
install::
$(INSTALLLIB) libcom_err.a $(DESTDIR)$(LIBDIR)/libcom_err.a
$(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libcom_err.a
@@ -104,7 +116,11 @@ install::
$(CHMOD) 444 $(DESTDIR)$(LIBDIR)/libcom_err.a
##
-clean-unix::
+clean-unix:: clean-files
+
+clean-mac:: clean-files
+
+clean-files::
rm -f *~ \#* *.bak \
*.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
*.cp *.fn *.ky *.log *.pg *.tp *.vr \
diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c
index b36efe3ab..b4487ab4f 100644
--- a/src/util/et/com_err.c
+++ b/src/util/et/com_err.c
@@ -36,9 +36,9 @@
* directly.
*/
#ifdef __STDC__
-extern char const *error_message (long);
+extern char const * INTERFACE error_message (long);
#else
-extern char *error_message ();
+extern char * INTERFACE error_message ();
#endif
static void
@@ -71,7 +71,7 @@ static void
#else
fputs (errbuf, stderr);
fflush(stderr);
-#endif
+#endif
}
#ifdef __STDC__
diff --git a/src/util/et/com_err.h b/src/util/et/com_err.h
index 9d5a92d15..e85965573 100644
--- a/src/util/et/com_err.h
+++ b/src/util/et/com_err.h
@@ -14,7 +14,7 @@
#ifndef HAVE_STDARG_H
/* End-user programs may need this -- oh well */
-#ifdef __STDC__
+#if defined(__STDC__) || defined(_WINDOWS)
#define HAVE_STDARG_H 1
#endif
#endif
@@ -39,7 +39,7 @@
#endif
#endif
-#ifdef __STDC__
+#if defined(__STDC__) || defined(_WINDOWS)
/* ANSI C -- use prototypes etc */
extern void INTERFACE_C com_err (const char *, long, const char *, ...);
extern char const * INTERFACE error_message (long);