--------------------- PatchSet 1703 Date: 2001/03/09 10:55:23 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: *** empty log message *** Members: include/config.h.in:1.1.1.3.10.3.2.2->1.1.1.3.10.3.2.3 include/md5.h:1.1.1.1.26.1->1.1.1.1.26.2 lib/md5.c:1.1.1.2.22.1->1.1.1.2.22.2 src/squid.h:1.1.1.3.12.5.2.7->1.1.1.3.12.5.2.8 Index: squid/include/config.h.in =================================================================== RCS file: /cvsroot/squid-sf//squid/include/Attic/config.h.in,v retrieving revision 1.1.1.3.10.3.2.2 retrieving revision 1.1.1.3.10.3.2.3 diff -u -r1.1.1.3.10.3.2.2 -r1.1.1.3.10.3.2.3 --- squid/include/config.h.in 26 Feb 2001 05:27:02 -0000 1.1.1.3.10.3.2.2 +++ squid/include/config.h.in 9 Mar 2001 10:55:23 -0000 1.1.1.3.10.3.2.3 @@ -1,5 +1,5 @@ /* - * $Id: config.h.in,v 1.1.1.3.10.3.2.2 2001/02/26 05:27:02 rbcollins Exp $ + * $Id: config.h.in,v 1.1.1.3.10.3.2.3 2001/03/09 10:55:23 rbcollins Exp $ * * AUTHOR: Duane Wessels * @@ -183,10 +183,4 @@ #define squid_srandom srand #endif -/* 32 bit integer compatability */ -#include "squid_types.h" -#define num32 int32_t -#define u_num32 u_int32_t - - #endif /* _CONFIG_H_ */ Index: squid/include/md5.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/md5.h,v retrieving revision 1.1.1.1.26.1 retrieving revision 1.1.1.1.26.2 diff -u -r1.1.1.1.26.1 -r1.1.1.1.26.2 --- squid/include/md5.h 23 Jan 2001 22:54:53 -0000 1.1.1.1.26.1 +++ squid/include/md5.h 9 Mar 2001 10:55:23 -0000 1.1.1.1.26.2 @@ -1,5 +1,5 @@ /* - * $Id: md5.h,v 1.1.1.1.26.1 2001/01/23 22:54:53 rbcollins Exp $ + * $Id: md5.h,v 1.1.1.1.26.2 2001/03/09 10:55:23 rbcollins Exp $ */ #ifndef MD5_H @@ -29,10 +29,12 @@ * documentation and/or software. */ +#include "squid_types.h" + /* MD5 context. */ typedef struct { - u_num32 state[4]; /* state (ABCD) */ - u_num32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + u_int32_t state[4]; /* state (ABCD) */ + u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } MD5_CTX; Index: squid/lib/md5.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/md5.c,v retrieving revision 1.1.1.2.22.1 retrieving revision 1.1.1.2.22.2 diff -u -r1.1.1.2.22.1 -r1.1.1.2.22.2 --- squid/lib/md5.c 23 Jan 2001 22:54:53 -0000 1.1.1.2.22.1 +++ squid/lib/md5.c 9 Mar 2001 10:55:23 -0000 1.1.1.2.22.2 @@ -1,5 +1,5 @@ /* - * $Id: md5.c,v 1.1.1.2.22.1 2001/01/23 22:54:53 rbcollins Exp $ + * $Id: md5.c,v 1.1.1.2.22.2 2001/03/09 10:55:23 rbcollins Exp $ */ /* taken from RFC-1321/Appendix A.3 */ @@ -63,9 +63,9 @@ #define S43 15 #define S44 21 -static void MD5Transform(u_num32[4], const unsigned char[64]); -static void Encode(unsigned char *, u_num32 *, unsigned int); -static void Decode(u_num32 *, const unsigned char *, unsigned int); +static void MD5Transform(u_int32_t[4], const unsigned char[64]); +static void Encode(unsigned char *, u_int32_t *, unsigned int); +static void Decode(u_int32_t *, const unsigned char *, unsigned int); #if HAVE_MEMCPY #define MD5_memcpy(to,from,count) memcpy(to,from,count) @@ -104,22 +104,22 @@ * separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ - (a) += F ((b), (c), (d)) + (x) + (u_num32)(ac); \ + (a) += F ((b), (c), (d)) + (x) + (u_int32_t)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define GG(a, b, c, d, x, s, ac) { \ - (a) += G ((b), (c), (d)) + (x) + (u_num32)(ac); \ + (a) += G ((b), (c), (d)) + (x) + (u_int32_t)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define HH(a, b, c, d, x, s, ac) { \ - (a) += H ((b), (c), (d)) + (x) + (u_num32)(ac); \ + (a) += H ((b), (c), (d)) + (x) + (u_int32_t)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define II(a, b, c, d, x, s, ac) { \ - (a) += I ((b), (c), (d)) + (x) + (u_num32)(ac); \ + (a) += I ((b), (c), (d)) + (x) + (u_int32_t)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } @@ -153,10 +153,10 @@ index = (unsigned int) ((context->count[0] >> 3) & 0x3F); /* Update number of bits */ - if ((context->count[0] += ((u_num32) inputLen << 3)) - < ((u_num32) inputLen << 3)) + if ((context->count[0] += ((u_int32_t) inputLen << 3)) + < ((u_int32_t) inputLen << 3)) context->count[1]++; - context->count[1] += ((u_num32) inputLen >> 29); + context->count[1] += ((u_int32_t) inputLen >> 29); partLen = 64 - index; @@ -213,9 +213,9 @@ * MD5 basic transformation. Transforms state based on block. */ static void -MD5Transform(u_num32 state[4], const unsigned char block[64]) +MD5Transform(u_int32_t state[4], const unsigned char block[64]) { - u_num32 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16]; Decode(x, block, 64); @@ -303,11 +303,11 @@ } /* - * Encodes input (u_num32) into output (unsigned char). Assumes len is a + * Encodes input (u_int32_t) into output (unsigned char). Assumes len is a * multiple of 4. */ static void -Encode(unsigned char *output, u_num32 * input, unsigned int len) +Encode(unsigned char *output, u_int32_t * input, unsigned int len) { unsigned int i, j; @@ -320,17 +320,17 @@ } /* - * Decodes input (unsigned char) into output (u_num32). Assumes len is a + * Decodes input (unsigned char) into output (u_int32_t). Assumes len is a * multiple of 4. */ static void -Decode(u_num32 * output, const unsigned char *input, unsigned int len) +Decode(u_int32_t * output, const unsigned char *input, unsigned int len) { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 4) - output[i] = ((u_num32) input[j]) | (((u_num32) input[j + 1]) << 8) | - (((u_num32) input[j + 2]) << 16) | (((u_num32) input[j + 3]) << 24); + output[i] = ((u_int32_t) input[j]) | (((u_int32_t) input[j + 1]) << 8) | + (((u_int32_t) input[j + 2]) << 16) | (((u_int32_t) input[j + 3]) << 24); } #if !HAVE_MEMCPY Index: squid/src/squid.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/squid.h,v retrieving revision 1.1.1.3.12.5.2.7 retrieving revision 1.1.1.3.12.5.2.8 diff -u -r1.1.1.3.12.5.2.7 -r1.1.1.3.12.5.2.8 --- squid/src/squid.h 26 Feb 2001 05:27:03 -0000 1.1.1.3.12.5.2.7 +++ squid/src/squid.h 9 Mar 2001 10:55:23 -0000 1.1.1.3.12.5.2.8 @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.1.1.3.12.5.2.7 2001/02/26 05:27:03 rbcollins Exp $ + * $Id: squid.h,v 1.1.1.3.12.5.2.8 2001/03/09 10:55:23 rbcollins Exp $ * * AUTHOR: Duane Wessels * @@ -89,6 +89,12 @@ #define assert(EX) ((EX)?((void)0):xassert("EX", __FILE__, __LINE__)) #endif + +/* 32 bit integer compatability */ +#include "squid_types.h" +#define num32 int32_t +#define u_num32 u_int32_t + #if HAVE_UNISTD_H #include #endif