beecrypt-3.0.0 merge: expand MP_WBITS into types.h
authorjbj <devnull@localhost>
Tue, 29 Apr 2003 08:35:56 +0000 (08:35 +0000)
committerjbj <devnull@localhost>
Tue, 29 Apr 2003 08:35:56 +0000 (08:35 +0000)
CVS patchset: 6788
CVS date: 2003/04/29 08:35:56

beecrypt/acinclude.m4
beecrypt/beecrypt.c
beecrypt/configure.ac
beecrypt/types.h.in

index 2f2c6a1..1925151 100644 (file)
@@ -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
index a850d70..031db70 100644 (file)
@@ -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;
index 0237a23..c461eaf 100644 (file)
@@ -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
index aa58309..663b3fd 100644 (file)
@@ -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;