From 34204aac424f8c29317d863d64f1c3bb4d241a50 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 3 Nov 2005 09:00:23 +0000 Subject: 2005-11-03 Paul Jakma * zebra.h: BSD BYTE_ORDER define isn't available everywhere, define if needs be. * checksum.h: new file. checksum.c exports in_cksum, provide a header for it. * checksum.c: (in_cksum) callers shouldn't have to know it uses a u_short internally, change to void *. * Makefile.am: Add checksum.h * command.h: remove bogus trailling slash. * md5.c: (general) Update it for the twentieth century. ANSI declarations are widely supported now.. Don't include system headers, only include zebra.h. Use POSIX types (the alternative is to define u_int64_t in a portable way - rest of Quagga needs same cleanup). Make endian-conditional code be compiler conditional rather than preprocessor conditional, so that breakage gets noticed quicker. * md5.h: POSIX types. Get rid of the odd __P() non-ANSI capable compiler compatibility hack. --- lib/md5.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/md5.h') diff --git a/lib/md5.h b/lib/md5.h index d899fbd3..9e627dd8 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -1,6 +1,6 @@ /* $USAGI: md5.h,v 1.2 2000/11/02 11:59:25 yoshfuji Exp $ */ /* $KAME: md5.h,v 1.4 2000/03/27 04:36:22 sumikawa Exp $ */ -/* $Id: md5.h,v 1.1 2005/09/28 15:47:44 vincent Exp $ */ +/* $Id: md5.h,v 1.2 2005/11/03 09:00:23 paul Exp $ */ /* * Copyright (C) 2004 6WIND @@ -46,8 +46,8 @@ typedef struct { union { - u_int32_t md5_state32[4]; - u_int8_t md5_state8[16]; + uint32_t md5_state32[4]; + uint8_t md5_state8[16]; } md5_st; #define md5_sta md5_st.md5_state32[0] @@ -57,20 +57,20 @@ typedef struct { #define md5_st8 md5_st.md5_state8 union { - u_int64_t md5_count64; - u_int8_t md5_count8[8]; + uint64_t md5_count64; + uint8_t md5_count8[8]; } md5_count; #define md5_n md5_count.md5_count64 #define md5_n8 md5_count.md5_count8 - u_int md5_i; - u_int8_t md5_buf[MD5_BUFLEN]; + uint md5_i; + uint8_t md5_buf[MD5_BUFLEN]; } md5_ctxt; -extern void md5_init __P((md5_ctxt *)); -extern void md5_loop __P((md5_ctxt *, u_int8_t *, u_int)); -extern void md5_pad __P((md5_ctxt *)); -extern void md5_result __P((u_int8_t *, md5_ctxt *)); +extern void md5_init (md5_ctxt *); +extern void md5_loop (md5_ctxt *, const uint8_t *, u_int); +extern void md5_pad (md5_ctxt *); +extern void md5_result (uint8_t *, md5_ctxt *); /* compatibility */ #define MD5_CTX md5_ctxt -- cgit v1.2.1