diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2023-01-20 10:07:53 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2023-01-20 10:07:53 +0000 |
commit | 6e69321e6ea08532309d997add40749e344423a3 (patch) | |
tree | 6f53902fd70868fc6edd0c56c3cae5a74bb1505d /lib | |
parent | 24f8ed21fcc0c02c1b0872f3864145431c123cdb (diff) |
Replace BN_DIV3W with HAVE_BN_DIV_3_WORDS (in bn_arch.h).
ok tb@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/arch/mips64/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libcrypto/bn/arch/mips64/bn_arch.h | 4 | ||||
-rw-r--r-- | lib/libcrypto/bn/bn_div.c | 7 |
3 files changed, 8 insertions, 6 deletions
diff --git a/lib/libcrypto/arch/mips64/Makefile.inc b/lib/libcrypto/arch/mips64/Makefile.inc index 3bdcfe03408..2d547f4a5c7 100644 --- a/lib/libcrypto/arch/mips64/Makefile.inc +++ b/lib/libcrypto/arch/mips64/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.6 2021/05/01 16:11:09 visa Exp $ +# $OpenBSD: Makefile.inc,v 1.7 2023/01/20 10:07:52 jsing Exp $ # mips64-specific libcrypto build rules @@ -10,7 +10,6 @@ SSLASM+= aes aes-mips aes-mips SRCS+= bf_enc.c # bn SSLASM+= bn mips bn-mips -CFLAGS+= -DBN_DIV3W SSLASM+= bn mips-mont mips-mont CFLAGS+= -DOPENSSL_BN_ASM_MONT # camellia diff --git a/lib/libcrypto/bn/arch/mips64/bn_arch.h b/lib/libcrypto/bn/arch/mips64/bn_arch.h index 4d6571f9cb4..6c6212c4a6f 100644 --- a/lib/libcrypto/bn/arch/mips64/bn_arch.h +++ b/lib/libcrypto/bn/arch/mips64/bn_arch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_arch.h,v 1.1 2023/01/20 10:04:34 jsing Exp $ */ +/* $OpenBSD: bn_arch.h,v 1.2 2023/01/20 10:07:52 jsing Exp $ */ /* * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> * @@ -20,5 +20,7 @@ #ifndef OPENSSL_NO_ASM +#define HAVE_BN_DIV_3_WORDS + #endif #endif diff --git a/lib/libcrypto/bn/bn_div.c b/lib/libcrypto/bn/bn_div.c index 47e491ec461..df4b7517d71 100644 --- a/lib/libcrypto/bn/bn_div.c +++ b/lib/libcrypto/bn/bn_div.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_div.c,v 1.31 2023/01/18 05:29:48 jsing Exp $ */ +/* $OpenBSD: bn_div.c,v 1.32 2023/01/20 10:07:52 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,11 +63,12 @@ #include <openssl/bn.h> #include <openssl/err.h> +#include "bn_arch.h" #include "bn_local.h" BN_ULONG bn_div_3_words(const BN_ULONG *m, BN_ULONG d1, BN_ULONG d0); -#ifndef BN_DIV3W +#ifndef HAVE_BN_DIV_3_WORDS #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__GNUC__) && __GNUC__>=2 @@ -199,7 +200,7 @@ bn_div_3_words(const BN_ULONG *m, BN_ULONG d1, BN_ULONG d0) return q; } -#endif /* !BN_DIV3W */ +#endif /* !HAVE_BN_DIV_3_WORDS */ /* * BN_div_internal computes quotient := numerator / divisor, rounding towards |