Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src pullup (approved by releng-1-5)
details: https://anonhg.NetBSD.org/src/rev/cc67e4018c38
branches: netbsd-1-5
changeset: 489698:cc67e4018c38
user: itojun <itojun%NetBSD.org@localhost>
date: Sat Oct 07 01:14:15 2000 +0000
description:
pullup (approved by releng-1-5)
repair openssl on non-32bit arch. confirmed to work on alpha/i386/sparc64.
disable IDEA/RC5 by default. they will be built as separate library,
libcrypto_{idea,rc5}.
cvs update -j1.65 -j1.68 share/mk/bsd.README
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc2/rc2cfb64.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc5/rc5cfb64.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/idea/i_cfb64.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc2/rc2ofb64.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc5/rc5ofb64.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/idea/i_ofb64.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc2/rc2_ecb.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc5/rc5_ecb.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/idea/i_ecb.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc2/rc2_cbc.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/idea/i_cbc.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc5/rc5_enc.c
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/rc2/rc2speed.c
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/rc5/rc5speed.c
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/idea/idea_spd.c
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/des/des_opts.c
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/cast/castopts.c
cvs update -j1.1 -j1.2 crypto/dist/openssl/crypto/x509v3/tabtest.c
cvs update -j1.1 -j1.3 crypto/dist/openssl/crypto/bn/divtest.c
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/md5/md5_dgst.c
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/idea/i_skey.c
cvs update -j1.3 -j1.4 lib/libcrypto/rc5.inc
cvs update -j1.3 -j1.4 lib/libcrypto/idea.inc
cvs update -j1.5 -j1.8 lib/libcrypto/srcs.inc
cvs update -j1.63 -j1.64 lib/Makefile
cvs update -j1.5 -j1.7 usr.bin/openssl/Makefile
cvs update -j1.8 -j1.9 lib/libcrypto/Makefile
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/mdc2/mdc2.h
cvs update -j1.1.1.1 -j1.3 crypto/dist/openssl/crypto/rc2/rc2.h
cvs update -j1.1.1.2 -j1.3 crypto/dist/openssl/crypto/md2/md2.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/ssl/ssl3.h
cvs update -j1.1.1.2 -j1.3 crypto/dist/openssl/crypto/rc4/rc4.h
cvs update -j1.1.1.1 -j1.3 crypto/dist/openssl/crypto/rc5/rc5.h
cvs update -j1.1.1.2 -j1.3 crypto/dist/openssl/crypto/md5/md5.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/x509/x509.h
cvs update -j1.1.1.1 -j1.3 crypto/dist/openssl/crypto/idea/idea.h
cvs update -j1.1.1.2 -j1.3 crypto/dist/openssl/crypto/sha/sha.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/dsa/dsa.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/rsa/rsa.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/hmac/hmac.h
cvs update -j1.1.1.2 -j1.3 crypto/dist/openssl/crypto/ripemd/ripemd.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/opensslconf.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/dh/dh.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/lhash/lhash.h
cvs update -j1.1.1.2 -j1.3 crypto/dist/openssl/crypto/bf/blowfish.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/idea/idea_lcl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/cast/cast_lcl.h
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc2/rc2_locl.h
cvs update -j1.1.1.1 -j1.2 crypto/dist/openssl/crypto/rc4/rc4_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/rc5/rc5_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/md5/md5_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/sha/sha_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/ripemd/rmd_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/bf/bf_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/ssl/ssl_locl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/ssl/ssl.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/pem/pem.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/bn/bn.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/bio/bio.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/evp/evp.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/err/err.h
cvs update -j1.5 -j1.7 crypto/dist/openssl/crypto/des/des.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/e_os.h
cvs update -j1.1.1.1 -j1.3 crypto/dist/openssl/crypto/cast/cast.h
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/x509/x509_vfy.h
cvs update -j1.270 -j1.273 distrib/sets/lists/man/mi
cvs update -j1.274 -j1.275 distrib/sets/lists/man/mi
cvs update -j1.258 -j1.262 distrib/sets/lists/comp/mi
cvs update -j1.142 -j1.144 share/mk/bsd.own.mk
cvs update -j1.3 -j1.5 crypto/Makefile.openssl
cvs update -j1.1.1.2 -j1.2 crypto/dist/openssl/crypto/opensslconf.h.in
new files (tag added)
lib/libcrypto/man/*
lib/libcrypto/man.inc
lib/libcrypto_idea/Makefile
lib/libcrypto_rc5/Makefile
lib/libcrypto/rc5_skey_dummy.c
lib/libcrypto/rc5_enc_dummy.c
lib/libcrypto/i_cbc_dummy.c
lib/libcrypto/i_skey_dummy.c
diffstat:
crypto/Makefile.openssl | 14 +-
crypto/dist/openssl/crypto/bf/bf_locl.h | 52 +++---
crypto/dist/openssl/crypto/bf/blowfish.h | 27 +---
crypto/dist/openssl/crypto/bio/bio.h | 3 -
crypto/dist/openssl/crypto/bn/bn.h | 132 +-----------------
crypto/dist/openssl/crypto/bn/divtest.c | 13 +-
crypto/dist/openssl/crypto/cast/cast.h | 6 +-
crypto/dist/openssl/crypto/cast/cast_lcl.h | 48 +++---
crypto/dist/openssl/crypto/cast/castopts.c | 4 +-
crypto/dist/openssl/crypto/des/des.h | 6 +-
crypto/dist/openssl/crypto/des/des_opts.c | 4 +-
crypto/dist/openssl/crypto/dh/dh.h | 3 -
crypto/dist/openssl/crypto/dsa/dsa.h | 7 -
crypto/dist/openssl/crypto/err/err.h | 4 -
crypto/dist/openssl/crypto/evp/evp.h | 75 ----------
crypto/dist/openssl/crypto/hmac/hmac.h | 3 -
crypto/dist/openssl/crypto/idea/i_cbc.c | 10 +-
crypto/dist/openssl/crypto/idea/i_cfb64.c | 8 +-
crypto/dist/openssl/crypto/idea/i_ecb.c | 2 +-
crypto/dist/openssl/crypto/idea/i_ofb64.c | 6 +-
crypto/dist/openssl/crypto/idea/i_skey.c | 2 +-
crypto/dist/openssl/crypto/idea/idea.h | 9 +-
crypto/dist/openssl/crypto/idea/idea_lcl.h | 56 +++---
crypto/dist/openssl/crypto/idea/idea_spd.c | 2 +-
crypto/dist/openssl/crypto/lhash/lhash.h | 2 -
crypto/dist/openssl/crypto/md2/md2.h | 6 +-
crypto/dist/openssl/crypto/md5/md5.h | 27 +---
crypto/dist/openssl/crypto/md5/md5_dgst.c | 16 +-
crypto/dist/openssl/crypto/md5/md5_locl.h | 5 +-
crypto/dist/openssl/crypto/mdc2/mdc2.h | 3 -
crypto/dist/openssl/crypto/opensslconf.h | 146 +--------------------
crypto/dist/openssl/crypto/opensslconf.h.in | 143 --------------------
crypto/dist/openssl/crypto/pem/pem.h | 6 -
crypto/dist/openssl/crypto/rc2/rc2.h | 10 +-
crypto/dist/openssl/crypto/rc2/rc2_cbc.c | 22 +-
crypto/dist/openssl/crypto/rc2/rc2_ecb.c | 2 +-
crypto/dist/openssl/crypto/rc2/rc2_locl.h | 48 +++---
crypto/dist/openssl/crypto/rc2/rc2cfb64.c | 8 +-
crypto/dist/openssl/crypto/rc2/rc2ofb64.c | 6 +-
crypto/dist/openssl/crypto/rc2/rc2speed.c | 4 +-
crypto/dist/openssl/crypto/rc4/rc4.h | 6 +-
crypto/dist/openssl/crypto/rc4/rc4_locl.h | 3 +
crypto/dist/openssl/crypto/rc5/rc5.h | 10 +-
crypto/dist/openssl/crypto/rc5/rc5_ecb.c | 2 +-
crypto/dist/openssl/crypto/rc5/rc5_enc.c | 10 +-
crypto/dist/openssl/crypto/rc5/rc5_locl.h | 48 +++---
crypto/dist/openssl/crypto/rc5/rc5cfb64.c | 8 +-
crypto/dist/openssl/crypto/rc5/rc5ofb64.c | 6 +-
crypto/dist/openssl/crypto/rc5/rc5speed.c | 4 +-
crypto/dist/openssl/crypto/ripemd/ripemd.h | 13 +-
crypto/dist/openssl/crypto/ripemd/rmd_locl.h | 3 +-
crypto/dist/openssl/crypto/rsa/rsa.h | 3 -
crypto/dist/openssl/crypto/sha/sha.h | 21 +--
crypto/dist/openssl/crypto/sha/sha_locl.h | 13 +-
crypto/dist/openssl/crypto/x509/x509.h | 22 ---
crypto/dist/openssl/crypto/x509/x509_vfy.h | 4 -
crypto/dist/openssl/crypto/x509v3/tabtest.c | 6 +-
crypto/dist/openssl/e_os.h | 12 -
crypto/dist/openssl/ssl/ssl.h | 12 -
crypto/dist/openssl/ssl/ssl3.h | 2 -
crypto/dist/openssl/ssl/ssl_locl.h | 8 -
distrib/sets/lists/comp/mi | 190 ++++++++++++++++++++++++++-
distrib/sets/lists/man/mi | 68 +++++++++-
lib/Makefile | 11 +-
lib/libcrypto/Makefile | 16 +-
lib/libcrypto/idea.inc | 12 +-
lib/libcrypto/rc5.inc | 12 +-
lib/libcrypto/srcs.inc | 60 ++-----
share/mk/bsd.README | 21 +-
share/mk/bsd.own.mk | 20 +--
usr.bin/openssl/Makefile | 16 +-
71 files changed, 587 insertions(+), 1005 deletions(-)
diffs (truncated from 3623 to 300 lines):
diff -r 7f59690f9904 -r cc67e4018c38 crypto/Makefile.openssl
--- a/crypto/Makefile.openssl Fri Oct 06 23:43:38 2000 +0000
+++ b/crypto/Makefile.openssl Sat Oct 07 01:14:15 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.openssl,v 1.2.2.1 2000/07/05 18:35:06 thorpej Exp $
+# $NetBSD: Makefile.openssl,v 1.2.2.2 2000/10/07 01:14:15 itojun Exp $
.ifndef _MAKEFILE_OPENSSL_INCLUDED
_MAKEFILE_OPENSSL_INCLUDED=1
@@ -8,16 +8,4 @@
OPENSSLSRC= ${CRYPTODIST}/openssl
CPPFLAGS+= -DOPENSSLDIR=\"/etc/openssl\"
-.if (${MKCRYPTO_IDEA} == "no")
-CPPFLAGS+= -DNO_IDEA
.endif
-
-.if (${MKCRYPTO_RC5} == "no")
-CPPFLAGS+= -DNO_RC5
-.endif
-
-.if (${MKCRYPTO_RSA} == "no")
-CPPFLAGS+= -DNO_RSA
-.endif
-
-.endif
diff -r 7f59690f9904 -r cc67e4018c38 crypto/dist/openssl/crypto/bf/bf_locl.h
--- a/crypto/dist/openssl/crypto/bf/bf_locl.h Fri Oct 06 23:43:38 2000 +0000
+++ b/crypto/dist/openssl/crypto/bf/bf_locl.h Sat Oct 07 01:14:15 2000 +0000
@@ -61,10 +61,10 @@
#include <openssl/opensslconf.h> /* BF_PTR, BF_PTR2 */
#undef c2l
-#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
- l|=((unsigned long)(*((c)++)))<< 8L, \
- l|=((unsigned long)(*((c)++)))<<16L, \
- l|=((unsigned long)(*((c)++)))<<24L)
+#define c2l(c,l) (l =((BF_LONG)(*((c)++))) , \
+ l|=((BF_LONG)(*((c)++)))<< 8L, \
+ l|=((BF_LONG)(*((c)++)))<<16L, \
+ l|=((BF_LONG)(*((c)++)))<<24L)
/* NOTE - c is not incremented as per c2l */
#undef c2ln
@@ -72,14 +72,14 @@
c+=n; \
l1=l2=0; \
switch (n) { \
- case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
- case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
- case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
- case 5: l2|=((unsigned long)(*(--(c)))); \
- case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
- case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
- case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
- case 1: l1|=((unsigned long)(*(--(c)))); \
+ case 8: l2 =((BF_LONG)(*(--(c))))<<24L; \
+ case 7: l2|=((BF_LONG)(*(--(c))))<<16L; \
+ case 6: l2|=((BF_LONG)(*(--(c))))<< 8L; \
+ case 5: l2|=((BF_LONG)(*(--(c)))); \
+ case 4: l1 =((BF_LONG)(*(--(c))))<<24L; \
+ case 3: l1|=((BF_LONG)(*(--(c))))<<16L; \
+ case 2: l1|=((BF_LONG)(*(--(c))))<< 8L; \
+ case 1: l1|=((BF_LONG)(*(--(c)))); \
} \
}
@@ -110,14 +110,14 @@
c+=n; \
l1=l2=0; \
switch (n) { \
- case 8: l2 =((unsigned long)(*(--(c)))) ; \
- case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
- case 6: l2|=((unsigned long)(*(--(c))))<<16; \
- case 5: l2|=((unsigned long)(*(--(c))))<<24; \
- case 4: l1 =((unsigned long)(*(--(c)))) ; \
- case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
- case 2: l1|=((unsigned long)(*(--(c))))<<16; \
- case 1: l1|=((unsigned long)(*(--(c))))<<24; \
+ case 8: l2 =((BF_LONG)(*(--(c)))) ; \
+ case 7: l2|=((BF_LONG)(*(--(c))))<< 8; \
+ case 6: l2|=((BF_LONG)(*(--(c))))<<16; \
+ case 5: l2|=((BF_LONG)(*(--(c))))<<24; \
+ case 4: l1 =((BF_LONG)(*(--(c)))) ; \
+ case 3: l1|=((BF_LONG)(*(--(c))))<< 8; \
+ case 2: l1|=((BF_LONG)(*(--(c))))<<16; \
+ case 1: l1|=((BF_LONG)(*(--(c))))<<24; \
} \
}
@@ -137,10 +137,10 @@
}
#undef n2l
-#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
- l|=((unsigned long)(*((c)++)))<<16L, \
- l|=((unsigned long)(*((c)++)))<< 8L, \
- l|=((unsigned long)(*((c)++))))
+#define n2l(c,l) (l =((BF_LONG)(*((c)++)))<<24L, \
+ l|=((BF_LONG)(*((c)++)))<<16L, \
+ l|=((BF_LONG)(*((c)++)))<< 8L, \
+ l|=((BF_LONG)(*((c)++))))
#undef l2n
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
@@ -172,9 +172,7 @@
#elif defined(BF_PTR)
-#ifndef BF_LONG_LOG2
-#define BF_LONG_LOG2 2 /* default to BF_LONG being 32 bits */
-#endif
+#define BF_LONG_LOG2 2 /* BF_LONG being 32 bits */
#define BF_M (0xFF<<BF_LONG_LOG2)
#define BF_0 (24-BF_LONG_LOG2)
#define BF_1 (16-BF_LONG_LOG2)
diff -r 7f59690f9904 -r cc67e4018c38 crypto/dist/openssl/crypto/bf/blowfish.h
--- a/crypto/dist/openssl/crypto/bf/blowfish.h Fri Oct 06 23:43:38 2000 +0000
+++ b/crypto/dist/openssl/crypto/bf/blowfish.h Sat Oct 07 01:14:15 2000 +0000
@@ -63,35 +63,12 @@
extern "C" {
#endif
-#ifdef NO_BF
-#error BF is disabled.
-#endif
#define BF_ENCRYPT 1
#define BF_DECRYPT 0
-/*
- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * ! BF_LONG has to be at least 32 bits wide. If it's wider, then !
- * ! BF_LONG_LOG2 has to be defined along. !
- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- */
-
-#if defined(WIN16) || defined(__LP32__)
-#define BF_LONG unsigned long
-#elif defined(_CRAY) || defined(__ILP64__)
-#define BF_LONG unsigned long
-#define BF_LONG_LOG2 3
-/*
- * _CRAY note. I could declare short, but I have no idea what impact
- * does it have on performance on none-T3E machines. I could declare
- * int, but at least on C90 sizeof(int) can be chosen at compile time.
- * So I've chosen long...
- * <appro%fy.chalmers.se@localhost>
- */
-#else
-#define BF_LONG unsigned int
-#endif
+#include <sys/types.h>
+#define BF_LONG u_int32_t
#define BF_ROUNDS 16
#define BF_BLOCK 8
diff -r 7f59690f9904 -r cc67e4018c38 crypto/dist/openssl/crypto/bio/bio.h
--- a/crypto/dist/openssl/crypto/bio/bio.h Fri Oct 06 23:43:38 2000 +0000
+++ b/crypto/dist/openssl/crypto/bio/bio.h Sat Oct 07 01:14:15 2000 +0000
@@ -472,9 +472,6 @@
size_t BIO_ctrl_get_read_request(BIO *b);
int BIO_ctrl_reset_read_request(BIO *b);
-#ifdef NO_STDIO
-#define NO_FP_API
-#endif
/* These two aren't currently implemented */
diff -r 7f59690f9904 -r cc67e4018c38 crypto/dist/openssl/crypto/bn/bn.h
--- a/crypto/dist/openssl/crypto/bn/bn.h Fri Oct 06 23:43:38 2000 +0000
+++ b/crypto/dist/openssl/crypto/bn/bn.h Sat Oct 07 01:14:15 2000 +0000
@@ -64,6 +64,8 @@
#endif
#include <openssl/opensslconf.h>
+#include <sys/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -78,87 +80,14 @@
#define RECP_MUL_MOD
#define MONT_MUL_MOD
-/* This next option uses the C libraries (2 word)/(1 word) function.
- * If it is not defined, I use my C version (which is slower).
- * The reason for this flag is that when the particular C compiler
- * library routine is used, and the library is linked with a different
- * compiler, the library is missing. This mostly happens when the
- * library is built with gcc and then linked using normal cc. This would
- * be a common occurrence because gcc normally produces code that is
- * 2 times faster than system compilers for the big number stuff.
- * For machines with only one compiler (or shared libraries), this should
- * be on. Again this in only really a problem on machines
- * using "long long's", are 32bit, and are not using my assembler code. */
-#if defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(linux)
-#define BN_DIV2W
-#endif
-
-/* assuming long is 64bit - this is the DEC Alpha
- * unsigned long long is only 64 bits :-(, don't define
- * BN_LLONG for the DEC Alpha */
-#ifdef SIXTY_FOUR_BIT_LONG
-#define BN_ULLONG unsigned long long
-#define BN_ULONG unsigned long
-#define BN_LONG long
-#define BN_BITS 128
-#define BN_BYTES 8
-#define BN_BITS2 64
-#define BN_BITS4 32
-#define BN_MASK (0xffffffffffffffffffffffffffffffffLL)
-#define BN_MASK2 (0xffffffffffffffffL)
-#define BN_MASK2l (0xffffffffL)
-#define BN_MASK2h (0xffffffff00000000L)
-#define BN_MASK2h1 (0xffffffff80000000L)
-#define BN_TBIT (0x8000000000000000L)
-#define BN_DEC_CONV (10000000000000000000UL)
-#define BN_DEC_FMT1 "%lu"
-#define BN_DEC_FMT2 "%019lu"
-#define BN_DEC_NUM 19
-#endif
-
-/* This is where the long long data type is 64 bits, but long is 32.
- * For machines where there are 64bit registers, this is the mode to use.
- * IRIX, on R4000 and above should use this mode, along with the relevant
- * assembler code :-). Do NOT define BN_LLONG.
- */
-#ifdef SIXTY_FOUR_BIT
-#undef BN_LLONG
-#undef BN_ULLONG
-#define BN_ULONG unsigned long long
-#define BN_LONG long long
-#define BN_BITS 128
-#define BN_BYTES 8
-#define BN_BITS2 64
-#define BN_BITS4 32
-#define BN_MASK2 (0xffffffffffffffffLL)
-#define BN_MASK2l (0xffffffffL)
-#define BN_MASK2h (0xffffffff00000000LL)
-#define BN_MASK2h1 (0xffffffff80000000LL)
-#define BN_TBIT (0x8000000000000000LL)
-#define BN_DEC_CONV (10000000000000000000LL)
-#define BN_DEC_FMT1 "%llu"
-#define BN_DEC_FMT2 "%019llu"
-#define BN_DEC_NUM 19
-#endif
-
-#ifdef THIRTY_TWO_BIT
-#if defined(WIN32) && !defined(__GNUC__)
-#define BN_ULLONG unsigned _int64
-#else
-#define BN_ULLONG unsigned long long
-#endif
-#define BN_ULONG unsigned long
-#define BN_LONG long
+#define BN_ULLONG u_int64_t
+#define BN_ULONG u_int32_t
+#define BN_LONG int32_t
#define BN_BITS 64
#define BN_BYTES 4
#define BN_BITS2 32
#define BN_BITS4 16
-#ifdef WIN32
-/* VC++ doesn't like the LL suffix */
-#define BN_MASK (0xffffffffffffffffL)
-#else
#define BN_MASK (0xffffffffffffffffLL)
-#endif
#define BN_MASK2 (0xffffffffL)
#define BN_MASK2l (0xffff)
#define BN_MASK2h1 (0xffff8000L)
@@ -168,53 +97,12 @@
#define BN_DEC_FMT1 "%lu"
#define BN_DEC_FMT2 "%09lu"
#define BN_DEC_NUM 9
-#endif
-#ifdef SIXTEEN_BIT
-#ifndef BN_DIV2W
-#define BN_DIV2W
-#endif
-#define BN_ULLONG unsigned long
-#define BN_ULONG unsigned short
-#define BN_LONG short
-#define BN_BITS 32
-#define BN_BYTES 2
-#define BN_BITS2 16
-#define BN_BITS4 8
-#define BN_MASK (0xffffffff)
-#define BN_MASK2 (0xffff)
-#define BN_MASK2l (0xff)
-#define BN_MASK2h1 (0xff80)
-#define BN_MASK2h (0xff00)
-#define BN_TBIT (0x8000)
-#define BN_DEC_CONV (100000)
-#define BN_DEC_FMT1 "%u"
-#define BN_DEC_FMT2 "%05u"
-#define BN_DEC_NUM 5
Home |
Main Index |
Thread Index |
Old Index