Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/libbn don't assume every...
details: https://anonhg.NetBSD.org/src/rev/aa2243d51125
branches: trunk
changeset: 782793:aa2243d51125
user: agc <agc%NetBSD.org@localhost>
date: Tue Nov 20 17:57:40 2012 +0000
description:
don't assume every platform is 64-bit - just use standard integer arithmetic
diffstat:
crypto/external/bsd/netpgp/dist/src/libbn/bignum.c | 2 +-
crypto/external/bsd/netpgp/dist/src/libbn/bn.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r 42656c744bad -r aa2243d51125 crypto/external/bsd/netpgp/dist/src/libbn/bignum.c
--- a/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c Tue Nov 20 16:33:06 2012 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/libbn/bignum.c Tue Nov 20 17:57:40 2012 +0000
@@ -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)))
diff -r 42656c744bad -r aa2243d51125 crypto/external/bsd/netpgp/dist/src/libbn/bn.h
--- a/crypto/external/bsd/netpgp/dist/src/libbn/bn.h Tue Nov 20 16:33:06 2012 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/libbn/bn.h Tue Nov 20 17:57:40 2012 +0000
@@ -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 {
Home |
Main Index |
Thread Index |
Old Index