Added new function, des_cblock_print_file(), which is referenced by
authorTheodore Tso <tytso@mit.edu>
Sat, 27 May 1995 01:45:10 +0000 (01:45 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 27 May 1995 01:45:10 +0000 (01:45 +0000)
libkrb4.a.  (Even though it's never used, some OS's demand that all of
the references in a shared library have to be resolved.)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5906 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/des425/ChangeLog
src/lib/des425/Makefile.in
src/lib/des425/configure.in
src/lib/des425/util.c [new file with mode: 0644]

index 4fb8a9aa8fe48615d3ea49880fa9ee1eb1fee698..d1c133a4722aef5a5ca8f6d2db3cfb52b2653cc6 100644 (file)
@@ -1,3 +1,10 @@
+Fri May 26 21:43:52 1995  Theodore Y. Ts'o  (tytso@dcl)
+
+       * util.c: Added new function, des_cblock_print_file(), which is
+               referenced by libkrb4.a.  (Even though it's never used,
+               some OS's demand that all of the references in a
+               shared library have to be resolved.)
+
 Mon May  1 11:29:37 1995  Ezra Peisach  (epeisach@kangaroo.mit.edu)
 
        * read_passwd.c: (des_read_pw_string): Call to krb5_read_password
index 7cc8a5202b5c6915e34dcdf96c32add3844174b6..a79f3506bfac84fef0a19221ccd7be0349559736 100644 (file)
@@ -5,6 +5,10 @@ LDFLAGS = -g
 ##DOSLIBNAME=libdes425.lib
 ##DOS!include $(BUILDTOP)\config\windows.in
 
+.c.o:
+       $(CC) $(CFLAGS) -c $(srcdir)/$*.c
+@SHARED_RULE@
+
 OBJS=  cksum.$(OBJEXT)         \
        des.$(OBJEXT)           \
        enc_dec.$(OBJEXT)       \
@@ -17,6 +21,7 @@ OBJS= cksum.$(OBJEXT)         \
        read_passwd.$(OBJEXT) \
        str_to_key.$(OBJEXT)    \
        unix_time.$(OBJEXT)     \
+       util.$(OBJEXT)          \
        weak_key.$(OBJEXT)      
 
 SRCS=  $(srcdir)/cksum.c       \
@@ -31,13 +36,24 @@ SRCS=       $(srcdir)/cksum.c       \
        $(srcdir)/read_passwd.c \
        $(srcdir)/str_to_key.c \
        $(srcdir)/unix_time.c   \
+       $(srcdir)/util.c        \
        $(srcdir)/weak_key.c    
 
+LIB_SUBDIRS= .
+LIBDONE= ./DONE
+
 
 EXT_LIB= libdes425.a $(TOPLIBD)/libcrypto.a
 DEPKLIB= $(TOPLIBD)/libcrypto.a
 
-all:: $(OBJS)
+all:: all-$(WHAT)
+
+all-unix:: shared $(OBJS)
+all-mac:: $(OBJS)
+all-windows:: $(OBJS)
+
+shared:
+       mkdir shared
 
 verify: verify.o libdes425.a $(DEPKLIB)
        $(CC) -o $@ verify.o $(LDFLAGS) $(EXT_LIB)
@@ -51,9 +67,15 @@ check-unix:: verify
 
 check-windows::
 
-clean::
+clean:: clean-$(WHAT)
        $(RM) verify$(EXEEXT) verify.$(OBJEXT)
 
+clean-unix::
+       $(RM) shared/*
+
+clean-mac::
+clean-windows::
+
 libdes425.a: $(OBJS)
        $(RM) $@
        $(ARADD) $@ $(OBJS)
index a37d5364d9d91ad3415198ed329341cdfa4ff8ce..4b268dad92f6fcfc5c17a2b2b433f8ff91e98f71 100644 (file)
@@ -6,7 +6,10 @@ AC_PROG_ARCHIVE
 AC_PROG_ARCHIVE_ADD
 AC_PROG_RANLIB
 AC_PROG_INSTALL
+V5_SHARED_LIB_OBJS
+SubdirLibraryRule([${OBJS}])
 AppendRule([all:: libdes425.a])
+V5_MAKE_SHARED_LIB(libdes425)
 KRB_INCLUDE
 WITH_KRB5ROOT
 V5_AC_OUTPUT_MAKEFILE
diff --git a/src/lib/des425/util.c b/src/lib/des425/util.c
new file mode 100644 (file)
index 0000000..5b2019b
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1988 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Miscellaneous debug printing utilities
+ */
+
+#ifndef        lint
+static char rcsid_util_c[] =
+"$Header$";
+#endif lint
+
+#include <stdio.h>
+
+/* Application include files */
+#include "k5-int.h"
+#include "des.h"
+
+des_cblock_print_file(x, fp)
+    des_cblock *x;
+    FILE *fp;
+{
+    unsigned char *y = (unsigned char *) x;
+    register int i = 0;
+    fprintf(fp," 0x { ");
+
+    while (i++ < 8) {
+       fprintf(fp,"%x",*y++);
+       if (i < 8)
+           fprintf(fp,", ");
+    }
+    fprintf(fp," }");
+}