From 37109e5015fad1687210f1de9b023275452fafd5 Mon Sep 17 00:00:00 2001 From: agc Date: Thu, 2 Mar 2006 20:34:17 +0000 Subject: Update the digest package to 20060302. Apply Tyler Retzlaff's patches from PR 32323 to make this compile with gcc4. --- pkgtools/digest/files/configure | 18 +++++++++--------- pkgtools/digest/files/configure.ac | 4 ++-- pkgtools/digest/files/sha2.c | 29 ----------------------------- pkgtools/digest/files/sha2.h | 28 ++++++++++++++++++++++++++++ pkgtools/digest/files/sha2hl.c | 10 +++++----- 5 files changed, 44 insertions(+), 45 deletions(-) (limited to 'pkgtools/digest') diff --git a/pkgtools/digest/files/configure b/pkgtools/digest/files/configure index 5b9bd694b6d..2d80f722b62 100755 --- a/pkgtools/digest/files/configure +++ b/pkgtools/digest/files/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for nbsd-digest 20050731. +# Generated by GNU Autoconf 2.59 for nbsd-digest 20060302. # # Report bugs to . # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='nbsd-digest' PACKAGE_TARNAME='nbsd-digest' -PACKAGE_VERSION='20050731' -PACKAGE_STRING='nbsd-digest 20050731' +PACKAGE_VERSION='20060302' +PACKAGE_STRING='nbsd-digest 20060302' PACKAGE_BUGREPORT='agc@netbsd.org' ac_unique_file="digest.c" @@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nbsd-digest 20050731 to adapt to many kinds of systems. +\`configure' configures nbsd-digest 20060302 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -846,7 +846,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nbsd-digest 20050731:";; + short | recursive ) echo "Configuration of nbsd-digest 20060302:";; esac cat <<\_ACEOF @@ -958,7 +958,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -nbsd-digest configure 20050731 +nbsd-digest configure 20060302 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -972,7 +972,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nbsd-digest $as_me 20050731, which was +It was created by nbsd-digest $as_me 20060302, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -5890,7 +5890,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by nbsd-digest $as_me 20050731, which was +This file was extended by nbsd-digest $as_me 20060302, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5950,7 +5950,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -nbsd-digest config.status 20050731 +nbsd-digest config.status 20060302 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/pkgtools/digest/files/configure.ac b/pkgtools/digest/files/configure.ac index 51eccb4c4a4..9460f302460 100644 --- a/pkgtools/digest/files/configure.ac +++ b/pkgtools/digest/files/configure.ac @@ -1,7 +1,7 @@ -dnl $Id: configure.ac,v 1.6 2005/07/31 22:45:24 agc Exp $ +dnl $Id: configure.ac,v 1.7 2006/03/02 20:34:17 agc Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([nbsd-digest],[20050731],[agc@netbsd.org]) +AC_INIT([nbsd-digest],[20060302],[agc@netbsd.org]) AC_CONFIG_SRCDIR([digest.c]) AC_CONFIG_HEADER(config.h) AC_ARG_PROGRAM diff --git a/pkgtools/digest/files/sha2.c b/pkgtools/digest/files/sha2.c index b0c44a2f8c3..7312981d97b 100644 --- a/pkgtools/digest/files/sha2.c +++ b/pkgtools/digest/files/sha2.c @@ -99,35 +99,6 @@ #error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN #endif -/* - * Define the followingsha2_* types to types of the correct length on - * the native archtecture. Most BSD systems and Linux define u_intXX_t - * types. Machines with very recent ANSI C headers, can use the - * uintXX_t definintions from inttypes.h by defining USE_INTTYPES_H - * during compile or in the sha.h header file. - * - * Machines that support neither u_intXX_t nor inttypes.h's uintXX_t - * will need to define these three typedefs below (and the appropriate - * ones in sha.h too) by hand according to their system architecture. - * - * Thank you, Jun-ichiro itojun Hagino, for suggesting using u_intXX_t - * types and pointing out recent ANSI C support for uintXX_t in inttypes.h. - */ -#ifdef USE_INTTYPES_H - -typedef uint8_t sha2_byte; /* Exactly 1 byte */ -typedef uint32_t sha2_word32; /* Exactly 4 bytes */ -typedef uint64_t sha2_word64; /* Exactly 8 bytes */ - -#else /* USE_INTTYPES_H */ - -typedef u_int8_t sha2_byte; /* Exactly 1 byte */ -typedef u_int32_t sha2_word32; /* Exactly 4 bytes */ -typedef u_int64_t sha2_word64; /* Exactly 8 bytes */ - -#endif /* USE_INTTYPES_H */ - - /*** SHA-256/384/512 Various Length Definitions ***********************/ /* NOTE: Most of these are in sha2.h */ #define SHA256_SHORT_BLOCK_LENGTH (SHA256_BLOCK_LENGTH - 8) diff --git a/pkgtools/digest/files/sha2.h b/pkgtools/digest/files/sha2.h index a0cc4e57d41..213d516769f 100644 --- a/pkgtools/digest/files/sha2.h +++ b/pkgtools/digest/files/sha2.h @@ -40,6 +40,34 @@ extern "C" { #endif +/* + * Define the following sha2_* types to types of the correct length on + * the native archtecture. Most BSD systems and Linux define u_intXX_t + * types. Machines with very recent ANSI C headers, can use the + * uintXX_t definintions from inttypes.h by defining USE_INTTYPES_H + * during compile or in the sha.h header file. + * + * Machines that support neither u_intXX_t nor inttypes.h's uintXX_t + * will need to define these three typedefs below (and the appropriate + * ones in sha.h too) by hand according to their system architecture. + * + * Thank you, Jun-ichiro itojun Hagino, for suggesting using u_intXX_t + * types and pointing out recent ANSI C support for uintXX_t in inttypes.h. + */ +#ifdef USE_INTTYPES_H + +typedef uint8_t sha2_byte; /* Exactly 1 byte */ +typedef uint32_t sha2_word32; /* Exactly 4 bytes */ +typedef uint64_t sha2_word64; /* Exactly 8 bytes */ + +#else /* USE_INTTYPES_H */ + +typedef u_int8_t sha2_byte; /* Exactly 1 byte */ +typedef u_int32_t sha2_word32; /* Exactly 4 bytes */ +typedef u_int64_t sha2_word64; /* Exactly 8 bytes */ + +#endif /* USE_INTTYPES_H */ + /*** SHA-256/384/512 Various Length Definitions ***********************/ #define SHA256_BLOCK_LENGTH 64 diff --git a/pkgtools/digest/files/sha2hl.c b/pkgtools/digest/files/sha2hl.c index 2706212fee9..2f341ddcdc4 100644 --- a/pkgtools/digest/files/sha2hl.c +++ b/pkgtools/digest/files/sha2hl.c @@ -1,4 +1,4 @@ -/* $NetBSD: sha2hl.c,v 1.3 2002/12/21 04:06:15 schmonz Exp $ */ +/* $NetBSD: sha2hl.c,v 1.4 2006/03/02 20:34:17 agc Exp $ */ /* * sha2hl.c @@ -47,7 +47,7 @@ #include #ifndef lint -__RCSID("$NetBSD: sha2hl.c,v 1.3 2002/12/21 04:06:15 schmonz Exp $"); +__RCSID("$NetBSD: sha2hl.c,v 1.4 2006/03/02 20:34:17 agc Exp $"); #endif /* not lint */ @@ -132,7 +132,7 @@ SHA256_End(SHA256_CTX *ctx, u_char *buffer) } char * -SHA256_Data(const u_char * data, size_t len, u_char *digest) +SHA256_Data(const sha2_byte * data, size_t len, u_char *digest) { SHA256_CTX ctx; @@ -192,7 +192,7 @@ SHA384_End(SHA384_CTX * ctx, char buffer[]) } char * -SHA384_Data(const u_char * data, size_t len, char digest[SHA384_DIGEST_STRING_LENGTH]) +SHA384_Data(const sha2_byte * data, size_t len, char digest[SHA384_DIGEST_STRING_LENGTH]) { SHA384_CTX ctx; @@ -252,7 +252,7 @@ SHA512_End(SHA512_CTX * ctx, char buffer[]) } char * -SHA512_Data(const u_char * data, size_t len, char *digest) +SHA512_Data(const sha2_byte * data, size_t len, char *digest) { SHA512_CTX ctx; -- cgit v1.2.3