From 9b2000ae8b5443f192a10c33a3e61fc9101c9256 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 17 Apr 2019 08:29:59 +0900 Subject: [PATCH] define MCL_MAX_BIT_SIZE in gmp_util.hpp --- include/mcl/gmp_util.hpp | 3 +++ include/mcl/op.hpp | 3 --- include/mcl/vint.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mcl/gmp_util.hpp b/include/mcl/gmp_util.hpp index d6b6b4d..117ecff 100644 --- a/include/mcl/gmp_util.hpp +++ b/include/mcl/gmp_util.hpp @@ -26,6 +26,9 @@ #if defined(__EMSCRIPTEN__) || defined(__wasm__) #define MCL_USE_VINT #endif +#ifndef MCL_MAX_BIT_SIZE + #define MCL_MAX_BIT_SIZE 521 +#endif #ifdef MCL_USE_VINT #include typedef mcl::Vint mpz_class; diff --git a/include/mcl/op.hpp b/include/mcl/op.hpp index 36d3703..ded5d1b 100644 --- a/include/mcl/op.hpp +++ b/include/mcl/op.hpp @@ -10,9 +10,6 @@ #include #include -#ifndef MCL_MAX_BIT_SIZE - #define MCL_MAX_BIT_SIZE 521 -#endif #if defined(__EMSCRIPTEN__) || defined(__wasm__) #define MCL_DONT_USE_XBYAK #define MCL_DONT_USE_OPENSSL diff --git a/include/mcl/vint.hpp b/include/mcl/vint.hpp index 3e2767f..8c1a13f 100644 --- a/include/mcl/vint.hpp +++ b/include/mcl/vint.hpp @@ -19,7 +19,7 @@ #define MCL_VINT_FIXED_BUFFER #endif #ifndef MCL_MAX_BIT_SIZE - #define MCL_MAX_BIT_SIZE 384 + #error "define MCL_MAX_BIT_SZIE" #endif #ifndef MCL_SIZEOF_UNIT