From 02617cf8c7c12442ad5514c8d8240cdd6039c3ca Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 1 May 2019 14:16:50 +0900 Subject: [PATCH] don't include exception.hpp if CYBOZU_DONT_USE_EXCEPTION is defined --- Makefile | 2 +- include/mcl/vint.hpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c356c42..4a964dc 100644 --- a/Makefile +++ b/Makefile @@ -335,7 +335,7 @@ ecdsa-wasm: bin/emu: $(CXX) -g -o $@ src/fp.cpp src/bn_c256.cpp test/bn_c256_test.cpp -DMCL_DONT_USE_XBYAK -DMCL_DONT_USE_OPENSSL -DMCL_USE_VINT -DMCL_SIZEOF_UNIT=8 -DMCL_VINT_64BIT_PORTABLE -DMCL_VINT_FIXED_BUFFER -DMCL_MAX_BIT_SIZE=256 -I./include bin/pairing_c_min.exe: sample/pairing_c.c include/mcl/vint.hpp src/fp.cpp include/mcl/bn.hpp - $(CXX) -o $@ sample/pairing_c.c src/fp.cpp src/bn_c256.cpp -Og -g -I./include -fno-threadsafe-statics -DMCL_DONT_USE_XBYAK -DMCL_DONT_USE_OPENSSL -DMCL_USE_VINT -DMCL_SIZEOF_UNIT=8 -DMCL_VINT_FIXED_BUFFER -DMCL_MAX_BIT_SIZE=256 -DMCL_VINT_64BIT_PORTABLE #-DNDEBUG -DMCL_DONT_USE_CSPRNG + $(CXX) -o $@ sample/pairing_c.c src/fp.cpp src/bn_c256.cpp -O3 -g -I./include -fno-threadsafe-statics -DMCL_DONT_USE_XBYAK -DMCL_DONT_USE_OPENSSL -DMCL_USE_VINT -DMCL_SIZEOF_UNIT=8 -DMCL_VINT_FIXED_BUFFER -DMCL_MAX_BIT_SIZE=256 -DMCL_VINT_64BIT_PORTABLE -DCYBOZU_DONT_USE_STRING -DCYBOZU_DONT_USE_EXCEPTION -DNDEBUG # -DMCL_DONT_USE_CSPRNG make_tbl: $(MAKE) ../bls/src/qcoeff-bn254.hpp diff --git a/include/mcl/vint.hpp b/include/mcl/vint.hpp index d9641e7..bf324f4 100644 --- a/include/mcl/vint.hpp +++ b/include/mcl/vint.hpp @@ -2,7 +2,9 @@ /** emulate mpz_class */ +#ifndef CYBOZU_DONT_USE_EXCEPTION #include +#endif #include #include #include