summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-18 15:09:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-18 15:09:36 (GMT)
commit601e71d7fc15a51716923ffe213ec68cb6cfc3c3 (patch)
tree02abb7979914624b9227795048859a7ee8984950 /libtommath
parent6c9ba2c3e1caa12aed6ef041c8fa23c7bc0a4212 (diff)
parent4da52405ca18b3fdb2be36de65bcd834a3497259 (diff)
downloadtcl-601e71d7fc15a51716923ffe213ec68cb6cfc3c3.zip
tcl-601e71d7fc15a51716923ffe213ec68cb6cfc3c3.tar.gz
tcl-601e71d7fc15a51716923ffe213ec68cb6cfc3c3.tar.bz2
Merge latest libtommath changes (will be release 1.2.0)
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/appveyor.yml4
-rw-r--r--libtommath/bn_s_mp_rand_platform.c7
-rw-r--r--libtommath/changes.txt3
-rw-r--r--libtommath/makefile.msvc2
-rw-r--r--libtommath/makefile_include.mk4
-rw-r--r--libtommath/tommath_private.h4
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 <windows.h>
#include <wincrypt.h>
-#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 eea4a94..fe78d27 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)