Module Name: src
Committed By: agc
Date: Tue Nov 20 17:57:41 UTC 2012
Modified Files:
src/crypto/external/bsd/netpgp/dist/src/libbn: bignum.c bn.h
Log Message:
don't assume every platform is 64-bit - just use standard integer arithmetic
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c \
src/crypto/external/bsd/netpgp/dist/src/libbn/bn.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c
diff -u src/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c:1.2 src/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c:1.3
--- src/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c:1.2 Tue Nov 20 05:26:25 2012
+++ src/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c Tue Nov 20 17:57:40 2012
@@ -76,7 +76,7 @@
*/
#define MP_PREC 32
-#define DIGIT_BIT 60
+#define DIGIT_BIT 28
#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
#define MP_WARRAY /*LINTED*/(1U << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT) + 1)))
Index: src/crypto/external/bsd/netpgp/dist/src/libbn/bn.h
diff -u src/crypto/external/bsd/netpgp/dist/src/libbn/bn.h:1.2 src/crypto/external/bsd/netpgp/dist/src/libbn/bn.h:1.3
--- src/crypto/external/bsd/netpgp/dist/src/libbn/bn.h:1.2 Tue Nov 20 05:26:25 2012
+++ src/crypto/external/bsd/netpgp/dist/src/libbn/bn.h Tue Nov 20 17:57:40 2012
@@ -44,8 +44,8 @@
__BEGIN_DECLS
-typedef unsigned long mp_digit;
-typedef unsigned long mp_word __attribute__ ((mode(TI)));
+typedef uint64_t mp_digit;
+typedef uint64_t mp_word;
/* multi-precision integer */
typedef struct mp_int {