From 01eb96d5995fc6ab49d3a0d06036797c953bb955 Mon Sep 17 00:00:00 2001 From: jbj Date: Tue, 29 Apr 2003 08:35:56 +0000 Subject: [PATCH] beecrypt-3.0.0 merge: expand MP_WBITS into types.h CVS patchset: 6788 CVS date: 2003/04/29 08:35:56 --- beecrypt/acinclude.m4 | 6 ++++-- beecrypt/beecrypt.c | 2 +- beecrypt/configure.ac | 2 +- beecrypt/types.h.in | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/beecrypt/acinclude.m4 b/beecrypt/acinclude.m4 index 2f2c6a1..1925151 100644 --- a/beecrypt/acinclude.m4 +++ b/beecrypt/acinclude.m4 @@ -92,9 +92,11 @@ AC_DEFUN(BEECRYPT_CPU_BITS,[ AH_TEMPLATE([MP_WBITS],[Define to the word size of your CPU]) AC_CHECK_SIZEOF([unsigned long]) if test $ac_cv_sizeof_unsigned_long -eq 8; then - AC_DEFINE([MP_WBITS],64) + mp_wbits="64U" + AC_SUBST(MP_WBITS,$mp_wbits) elif test $ac_cv_sizeof_unsigned_long -eq 4; then - AC_DEFINE([MP_WBITS],32) + mp_wbits="32U" + AC_SUBST(MP_WBITS,$mp_wbits) else AC_MSG_ERROR([Illegal CPU word size]) fi diff --git a/beecrypt/beecrypt.c b/beecrypt/beecrypt.c index a850d70..031db70 100644 --- a/beecrypt/beecrypt.c +++ b/beecrypt/beecrypt.c @@ -731,7 +731,7 @@ int keyedHashFunctionContextDigest(keyedHashFunctionContext* ctxt, byte* digest) return ctxt->algo->digest(ctxt->param, digest); } -int keyedHashFunctionContextDigestMP(keyedHashFunctionContext* ctxt, mpnumber* d) +int keyedHashFunctionContextDigestMP(keyedHashFunctionContext* ctxt, const mpnumber* d) { if (ctxt == (keyedHashFunctionContext*) 0) return -1; diff --git a/beecrypt/configure.ac b/beecrypt/configure.ac index 0237a23..c461eaf 100644 --- a/beecrypt/configure.ac +++ b/beecrypt/configure.ac @@ -4,7 +4,7 @@ AC_INIT([beecrypt],[3.0.0pre],[bob.deblier@pandora.be]) AM_INIT_AUTOMAKE AC_CANONICAL_TARGET AC_CONFIG_SRCDIR(beecrypt.h) -AC_CONFIG_HEADERS([beecrypt.gnu.h]) +AC_CONFIG_HEADERS([config.h]) AC_LIBTOOL_WIN32_DLL # Checks for package options diff --git a/beecrypt/types.h.in b/beecrypt/types.h.in index aa58309..663b3fd 100644 --- a/beecrypt/types.h.in +++ b/beecrypt/types.h.in @@ -100,7 +100,9 @@ typedef int64_t javalong; typedef uint16_t javachar; -#define MP_WBITS 32U +#if !defined(MP_WBITS) +#define MP_WBITS @MP_WBITS@ +#endif #if (MP_WBITS == 64) typedef uint64_t mpw; -- 2.7.4