Platform: Compaq OpenVMS Alpha 7.3 Compiler: Compaq C T6.5 The following patch resolves compile problems with the checksum.c module. The type (char) was being used where the usage indicated either (void) or (unsigned char) should be used. The const qualifier was added to impove compiler efficiency. There may be more cases in this module where type (char) is being used instead of what appears should be (unsigned char). -John wb8tyw@qsl.network Personal Opinion Only EAGLE> type checksum.gdiff --- ref_src:checksum.c Sat Jan 5 13:27:01 2002 +++ lcl_src:checksum.c Sun Jan 6 22:41:06 2002 @@ -1,3 +1,4 @@ +/* Converted by prj_src:unix_c_to_vms_c.tpu AND PRJ_SRC:CHECKSUM.TPU on 6-JAN-2002 22:41:06.45 OPENVMS_AXP */ /* Copyright (C) Andrew Tridgell 1996 Copyright (C) Paul Mackerras 1996 @@ -30,7 +31,7 @@ a simple 32 bit checksum that can be upadted from either end (inspired by Mark Adler's Adler-32 checksum) */ -uint32 get_checksum1(char *buf1,int len) +uint32 get_checksum1(const void *buf1,int len) { int i; uint32 s1, s2; @@ -49,7 +50,7 @@ } -void get_checksum2(char *buf,int len,char *sum) +void get_checksum2(const void *buf,int len,unsigned char *sum) { int i; static char *buf1; @@ -82,7 +83,7 @@ } -void file_checksum(char *fname,char *sum,OFF_T size) +void file_checksum(const char *fname, void *sum,OFF_T size) { OFF_T i; struct map_struct *buf; @@ -133,15 +134,17 @@ void sum_init(void) { - char s[4]; + unsigned char s[4]; mdfour_begin(&md); sumresidue=0; SIVAL(s,0,checksum_seed); sum_update(s,4); } -void sum_update(char *p,int len) +void sum_update(void *p1,int len) { +unsigned char * p; + p = (unsigned char *)p1; int i; if (len + sumresidue < CSUM_CHUNK) { memcpy(sumrbuf+sumresidue, p, len); @@ -170,7 +173,7 @@ } } -void sum_end(char *sum) +void sum_end(void *sum) { if (sumresidue) { mdfour_update(&md, (uchar *)sumrbuf, sumresidue);