summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/crc32/ChangeLog13
-rw-r--r--src/lib/crypto/crc32/Makefile.in25
-rw-r--r--src/lib/crypto/crc32/crc.c6
-rw-r--r--src/lib/crypto/crc32/crctest.c2
4 files changed, 32 insertions, 14 deletions
diff --git a/src/lib/crypto/crc32/ChangeLog b/src/lib/crypto/crc32/ChangeLog
index a33322ef1..e457eb20d 100644
--- a/src/lib/crypto/crc32/ChangeLog
+++ b/src/lib/crypto/crc32/ChangeLog
@@ -1,3 +1,16 @@
+Mon Feb 6 19:24:13 1995 Keith Vetter (keithv@fusion.com)
+
+ * Makefile.in: made to work under Windows
+ - added windows only make preamble
+ - moved the all target after the objects it depends on
+ - used $(OBJEXT) and $(EXEEXT) where needed
+ - split crctest into unix rules and windows rules
+ - changed file separatars into macros where needed
+ * crctest.c: changed int to long to work on 16 bit machines
+ * crc.c: added Windows calling convention to the function
+ and casted the assignment of the function.
+
+
Wed Jan 25 20:01:33 1995 John Gilmore (gnu at toad.com)
* crc-32.h: New file, moved from include/krb5/crc-32.h.
diff --git a/src/lib/crypto/crc32/Makefile.in b/src/lib/crypto/crc32/Makefile.in
index 15e9a79ea..b8a750c5c 100644
--- a/src/lib/crypto/crc32/Makefile.in
+++ b/src/lib/crypto/crc32/Makefile.in
@@ -1,20 +1,25 @@
CFLAGS = $(CCOPTS) $(DEFS)
-all:: $(OBJS)
-
+##DOSBUILDTOP = ..\..\..
+##DOSLIBNAME=..\libcrypto.$(LIBEXT)
+##DOS!include $(BUILDTOP)\config\windows.in
-
-OBJS= crc.o
+OBJS= crc.$(OBJEXT)
SRCS= $(srcdir)/crc.c $(srcdir)/crctest.c
-crctest: crctest.o $(OBJS)
+all:: $(OBJS)
+
+crctest-unix: crctest.$(OBJEXT) $(OBJS)
$(RM) crctest
- $(CC) -o $@ crctest.o $(CCFLAGS) $(OBJS)
+ $(CC) -o crctest crctest.$(OBJEXT) $(CCFLAGS) $(OBJS)
-check:: crctest
- ./crctest < $(srcdir)/crc-test
+crctest-windows:
+ $(CC) -o crctest.exe $(CFLAGS2) $(SRCS)
+ $(RM) $(OBJS)
-clean::
- $(RM) crctest crctest.o
+check:: crctest-$(WHAT)
+ $(C)crctest$(EXEEXT) < $(srcdir)$(S)crc-test
+clean::
+ $(RM) crctest$(EXEEXT) crctest.$(OBJEXT)
diff --git a/src/lib/crypto/crc32/crc.c b/src/lib/crypto/crc32/crc.c
index 28dd15d1c..3e29e9a5f 100644
--- a/src/lib/crypto/crc32/crc.c
+++ b/src/lib/crypto/crc32/crc.c
@@ -143,13 +143,13 @@ static u_long const crc_table[256] = {
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
-static krb5_error_code
+krb5_error_code API
crc32_sum_func(in, in_length, seed, seed_length, outcksum)
krb5_pointer in;
size_t in_length;
krb5_pointer seed;
size_t seed_length;
-krb5_checksum *outcksum;
+krb5_checksum FAR *outcksum;
{
register u_char *data;
register u_long c = 0;
@@ -176,7 +176,7 @@ krb5_checksum *outcksum;
krb5_checksum_entry crc32_cksumtable_entry = {
0,
- crc32_sum_func,
+ (SUM_FUNC) crc32_sum_func,
CRC32_CKSUM_LENGTH, /* CRC-32 is 4 octets */
0, /* not collision proof */
0, /* doesn't use key */
diff --git a/src/lib/crypto/crc32/crctest.c b/src/lib/crypto/crc32/crctest.c
index 25b97dae8..7a70a8b82 100644
--- a/src/lib/crypto/crc32/crctest.c
+++ b/src/lib/crypto/crc32/crctest.c
@@ -38,7 +38,7 @@ main()
char input[16], expected_crc[16];
unsigned char inbytes[4], outbytes[4];
int in_length;
- unsigned int expect;
+ unsigned long expect;
int bad = 0;