From de326e5c5ed447c99c7be6991f76cc9d5e774698 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 13 Dec 2019 21:48:15 +0000 Subject: Don't export mp_sqr() directly from libtcl --- libtommath/tommath_private.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h index 60c8838..93724a4 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -249,6 +249,11 @@ MP_DEPRECATED(s_mp_toom_mul) mp_err mp_toom_mul(const mp_int *a, const mp_int *b MP_DEPRECATED(s_mp_toom_sqr) mp_err mp_toom_sqr(const mp_int *a, mp_int *b); MP_DEPRECATED(s_mp_reverse) void bn_reverse(unsigned char *s, int len); +#ifndef TCL_WITH_EXTERNAL_TOMMATH +#undef mp_sqr +#define mp_sqr TclBN_mp_sqr +#endif + #undef mp_sqr #define mp_sqr TclBN_mp_sqr -- cgit v0.12 From 59f4600ec373640bb58e8a9690a5fc129844a49a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 13 Dec 2019 22:18:40 +0000 Subject: One #undef too much --- libtommath/tommath_private.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h index 93724a4..072d603 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -254,9 +254,6 @@ MP_DEPRECATED(s_mp_reverse) void bn_reverse(unsigned char *s, int len); #define mp_sqr TclBN_mp_sqr #endif -#undef mp_sqr -#define mp_sqr TclBN_mp_sqr - #define MP_GET_ENDIANNESS(x) \ do{\ int16_t n = 0x1; \ -- cgit v0.12