From 12c8a0c839bb180c7a5ae3c49479534591a0d9c9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 18 Oct 2019 14:04:41 +0000 Subject: update libtommath to v1.2.0-rc2, with a few additional fixes. --- libtommath/appveyor.yml | 4 +++- libtommath/bn_s_mp_rand_platform.c | 7 ------- libtommath/changes.txt | 3 +++ libtommath/makefile.msvc | 2 +- libtommath/makefile_include.mk | 4 ++-- libtommath/tommath_private.h | 4 ++++ 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/libtommath/appveyor.yml b/libtommath/appveyor.yml index 332cbdc..187a09a 100644 --- a/libtommath/appveyor.yml +++ b/libtommath/appveyor.yml @@ -6,11 +6,13 @@ branches: - /^release/ - /^travis/ image: +- Visual Studio 2019 - Visual Studio 2017 - Visual Studio 2015 build_script: - cmd: >- - if "Visual Studio 2017"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" + if "Visual Studio 2019"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + if "Visual Studio 2017"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 nmake -f makefile.msvc all diff --git a/libtommath/bn_s_mp_rand_platform.c b/libtommath/bn_s_mp_rand_platform.c index 07555db..27339bf 100644 --- a/libtommath/bn_s_mp_rand_platform.c +++ b/libtommath/bn_s_mp_rand_platform.c @@ -27,16 +27,9 @@ static mp_err s_read_arc4random(void *p, size_t n) #define ARM #endif -#ifdef _MSC_VER -# pragma warning(push) -# pragma warning (disable : 4668) -#endif #define WIN32_LEAN_AND_MEAN #include #include -#ifdef _MSC_VER -# pragma warning(pop) -#endif static mp_err s_read_wincsp(void *p, size_t n) { diff --git a/libtommath/changes.txt b/libtommath/changes.txt index c49429d..6f44409 100644 --- a/libtommath/changes.txt +++ b/libtommath/changes.txt @@ -24,6 +24,9 @@ v1.2.0 -- Provide a whole set of setters&getters for different primitive types (long, uint32_t, etc.) -- All those primitive setters are now optimized. -- It's possible to automatically tune the cutoff values for Karatsuba&Toom-Cook + -- The custom allocators which were formerly known as XMALLOC(), XFREE() etc. are now available + as MP_MALLOC(), MP_REALLOC(), MP_CALLOC() and MP_FREE(). MP_REALLOC() and MP_FREE() now also + provide the allocated size to ease the usage of simple allocators without tracking. -- Added mp_decr() and mp_incr() -- Added mp_log_u32() -- Improved prime-checking diff --git a/libtommath/makefile.msvc b/libtommath/makefile.msvc index d282e93..aa8d8be 100644 --- a/libtommath/makefile.msvc +++ b/libtommath/makefile.msvc @@ -14,7 +14,7 @@ PREFIX = c:\devel CFLAGS = /Ox #Compilation flags -LTM_CFLAGS = /nologo /I./ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1 /D_CRT_HAS_CXX17=0 /Wall /wd4146 /wd4127 /wd4710 /wd4711 /wd4820 /wd4003 /WX $(CFLAGS) +LTM_CFLAGS = /nologo /I./ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1 /D_CRT_HAS_CXX17=0 /Wall /wd4146 /wd4127 /wd4668 /wd4710 /wd4711 /wd4820 /wd5045 /WX $(CFLAGS) LTM_LDFLAGS = advapi32.lib #Libraries to be created (this makefile builds only static libraries) diff --git a/libtommath/makefile_include.mk b/libtommath/makefile_include.mk index a4b36b5..00ae204 100644 --- a/libtommath/makefile_include.mk +++ b/libtommath/makefile_include.mk @@ -3,9 +3,9 @@ # #version of library -VERSION=1.2.0-rc1 +VERSION=1.2.0-rc2 VERSION_PC=1.2.0 -VERSION_SO=3:0:1 +VERSION_SO=3:0:2 PLATFORM := $(shell uname | sed -e 's/_.*//') diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h index 7c167a5..1a0096f 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -141,6 +141,10 @@ extern void MP_FREE(void *mem, size_t size); #endif /* feature detection macro */ +#ifdef _MSC_VER +/* Prevent false positive: not enough arguments for function-like macro invocation */ +#pragma warning(disable: 4003) +#endif #define MP_STRINGIZE(x) MP__STRINGIZE(x) #define MP__STRINGIZE(x) ""#x"" #define MP_HAS(x) (sizeof(MP_STRINGIZE(BN_##x##_C)) == 1u) -- cgit v0.12