summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.fossil-settings/binary-glob5
-rw-r--r--doc/interp.n2
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclBinary.c2
-rw-r--r--generic/tclDictObj.c2
-rw-r--r--generic/tclExecute.c2
-rw-r--r--generic/tclObj.c2
-rw-r--r--generic/tclScan.c2
-rw-r--r--generic/tclStrToD.c2
-rw-r--r--generic/tclStringObj.c2
-rw-r--r--generic/tclStubInit.c52
-rw-r--r--generic/tclTestObj.c2
-rw-r--r--generic/tclTomMathDecls.h150
-rw-r--r--generic/tclTomMathInterface.c2
-rw-r--r--generic/tclUtil.c2
-rw-r--r--generic/tclVar.c2
-rw-r--r--generic/tclZlib.c2
-rw-r--r--libtommath/win32/tommath.libbin88136 -> 25364 bytes
-rwxr-xr-xlibtommath/win64/tommath.libbin0 -> 24736 bytes
-rw-r--r--tests/cmdMZ.test4
-rw-r--r--unix/Makefile.in9
-rwxr-xr-xunix/configure36
-rw-r--r--unix/configure.ac8
-rw-r--r--win/Makefile.in34
-rwxr-xr-xwin/configure4
-rw-r--r--win/tcl.m44
-rw-r--r--win/tclWinTest.c1
27 files changed, 247 insertions, 88 deletions
diff --git a/.fossil-settings/binary-glob b/.fossil-settings/binary-glob
index ec574be..6681879 100644
--- a/.fossil-settings/binary-glob
+++ b/.fossil-settings/binary-glob
@@ -4,6 +4,11 @@ compat/zlib/win64/zdll.lib
compat/zlib/win64/zlib1.dll
compat/zlib/win64/libz.dll.a
compat/zlib/zlib.3.pdf
+libtommath/win32/tommath.lib
+libtommath/win32/libtommath.dll
+libtommath/win64/tommath.lib
+libtommath/win64/libtommath.dll
+libtommath/win64/libtommath.dll.a
*.bmp
*.gif
*.png \ No newline at end of file
diff --git a/doc/interp.n b/doc/interp.n
index e91e403..40ab9f9 100644
--- a/doc/interp.n
+++ b/doc/interp.n
@@ -201,7 +201,7 @@ slave interpreter identified by \fIpath\fR. If no arguments are
given, option and current setting are returned. If \fB\-frame\fR
is given, the debug setting is set to the given boolean if provided
and the current setting is returned.
-This only effects the output of \fBinfo frame\fR, in that exact
+This only affects the output of \fBinfo frame\fR, in that exact
frame-level information for command invocation at the bytecode level
is only captured with this setting on.
.RS
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 1806557..fc8e05e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -20,7 +20,7 @@
#include "tclInt.h"
#include "tclOOInt.h"
#include "tclCompile.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <math.h>
#include <assert.h>
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 1f78d18..329648e 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -12,7 +12,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <math.h>
#include <assert.h>
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index baf96a8..2ae48ca 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -11,7 +11,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <assert.h>
/*
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 680bdd0..2feee93 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -18,7 +18,7 @@
#include "tclInt.h"
#include "tclCompile.h"
#include "tclOOInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <math.h>
#include <assert.h>
diff --git a/generic/tclObj.c b/generic/tclObj.c
index f233038..45bff8b 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -15,7 +15,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <math.h>
#include <assert.h>
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 74ec2da..e2fd9bf 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -10,7 +10,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
/*
* Flag values used by Tcl_ScanObjCmd.
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index e7cb2c5..346503b 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -14,7 +14,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <math.h>
/*
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 4dd334d..9dde8f0 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -35,7 +35,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include "tclStringRep.h"
#include "assert.h"
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 06f251a..5405ec4 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -92,8 +92,6 @@
#define TclBN_mp_init_set mp_init_set
#define TclBN_mp_init_set_int mp_init_set_int
#define TclBN_mp_init_size mp_init_size
-#define TclBN_mp_karatsuba_mul mp_karatsuba_mul
-#define TclBN_mp_karatsuba_sqr mp_karatsuba_sqr
#define TclBN_mp_lshd mp_lshd
#define TclBN_mp_mod mp_mod
#define TclBN_mp_mod_2d mp_mod_2d
@@ -121,23 +119,10 @@
#define TclBN_mp_tc_xor mp_tc_xor
#define TclBN_mp_to_unsigned_bin mp_to_unsigned_bin
#define TclBN_mp_to_unsigned_bin_n mp_to_unsigned_bin_n
-#define TclBN_mp_toom_mul mp_toom_mul
-#define TclBN_mp_toom_sqr mp_toom_sqr
#define TclBN_mp_toradix_n mp_toradix_n
#define TclBN_mp_unsigned_bin_size mp_unsigned_bin_size
#define TclBN_mp_xor mp_xor
#define TclBN_mp_zero mp_zero
-#define TclBN_reverse bn_reverse
-#define TclBN_fast_s_mp_mul_digs fast_s_mp_mul_digs
-#define TclBN_fast_s_mp_sqr fast_s_mp_sqr
-#define TclBN_mp_karatsuba_mul mp_karatsuba_mul
-#define TclBN_mp_karatsuba_sqr mp_karatsuba_sqr
-#define TclBN_mp_toom_mul mp_toom_mul
-#define TclBN_mp_toom_sqr mp_toom_sqr
-#define TclBN_s_mp_add s_mp_add
-#define TclBN_s_mp_mul_digs s_mp_mul_digs
-#define TclBN_s_mp_sqr s_mp_sqr
-#define TclBN_s_mp_sub s_mp_sub
#define TclBN_mp_init_set_int mp_init_set_int
#define TclBN_mp_set_int mp_set_int
#define TclBN_mp_cnt_lsb mp_cnt_lsb
@@ -153,6 +138,32 @@
#define TclBN_mp_tc_div_2d mp_tc_div_2d
#define TclBN_mp_get_bit mp_get_bit
+#if !defined(TCL_NO_DEPRECATED) && (!defined(_WIN32) || defined(STATIC_BUILD))
+#define TclBN_reverse bn_reverse
+#define TclBN_fast_s_mp_mul_digs fast_s_mp_mul_digs
+#define TclBN_fast_s_mp_sqr fast_s_mp_sqr
+#define TclBN_mp_karatsuba_mul mp_karatsuba_mul
+#define TclBN_mp_karatsuba_sqr mp_karatsuba_sqr
+#define TclBN_mp_toom_mul mp_toom_mul
+#define TclBN_mp_toom_sqr mp_toom_sqr
+#define TclBN_s_mp_add s_mp_add
+#define TclBN_s_mp_mul_digs s_mp_mul_digs
+#define TclBN_s_mp_sqr s_mp_sqr
+#define TclBN_s_mp_sub s_mp_sub
+#else
+#define TclBN_reverse 0
+#define TclBN_fast_s_mp_mul_digs 0
+#define TclBN_fast_s_mp_sqr 0
+#define TclBN_mp_karatsuba_mul 0
+#define TclBN_mp_karatsuba_sqr 0
+#define TclBN_mp_toom_mul 0
+#define TclBN_mp_toom_sqr 0
+#define TclBN_s_mp_add 0
+#define TclBN_s_mp_mul_digs 0
+#define TclBN_s_mp_sqr 0
+#define TclBN_s_mp_sub 0
+#endif
+
/* See bug 510001: TclSockMinimumBuffers needs plat imp */
#if defined(_WIN64) || defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8
# define TclSockMinimumBuffersOld 0
@@ -510,17 +521,6 @@ static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsig
# define TclOldFreeObj 0
# undef Tcl_StringMatch
# define Tcl_StringMatch 0
-# define TclBN_reverse 0
-# define TclBN_fast_s_mp_mul_digs 0
-# define TclBN_fast_s_mp_sqr 0
-# define TclBN_mp_karatsuba_mul 0
-# define TclBN_mp_karatsuba_sqr 0
-# define TclBN_mp_toom_mul 0
-# define TclBN_mp_toom_sqr 0
-# define TclBN_s_mp_add 0
-# define TclBN_s_mp_mul_digs 0
-# define TclBN_s_mp_sqr 0
-# define TclBN_s_mp_sub 0
#else /* TCL_NO_DEPRECATED */
# define Tcl_SeekOld seekOld
# define Tcl_TellOld tellOld
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index a289e32..30af177 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -18,7 +18,7 @@
# define USE_TCL_STUBS
#endif
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include "tclStringRep.h"
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h
index afe704f..048d184 100644
--- a/generic/tclTomMathDecls.h
+++ b/generic/tclTomMathDecls.h
@@ -631,6 +631,156 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
/* !END!: Do not edit above this line. */
+#if defined(USE_TCL_STUBS)
+#define mp_add \
+ (tclTomMathStubsPtr->tclBN_mp_add) /* 2 */
+#define mp_add_d \
+ (tclTomMathStubsPtr->tclBN_mp_add_d) /* 3 */
+#define mp_and \
+ (tclTomMathStubsPtr->tclBN_mp_and) /* 4 */
+#define mp_clamp \
+ (tclTomMathStubsPtr->tclBN_mp_clamp) /* 5 */
+#define mp_clear \
+ (tclTomMathStubsPtr->tclBN_mp_clear) /* 6 */
+#define mp_clear_multi \
+ (tclTomMathStubsPtr->tclBN_mp_clear_multi) /* 7 */
+#define mp_cmp \
+ (tclTomMathStubsPtr->tclBN_mp_cmp) /* 8 */
+#define mp_cmp_d \
+ (tclTomMathStubsPtr->tclBN_mp_cmp_d) /* 9 */
+#define mp_cmp_mag \
+ (tclTomMathStubsPtr->tclBN_mp_cmp_mag) /* 10 */
+#define mp_copy \
+ (tclTomMathStubsPtr->tclBN_mp_copy) /* 11 */
+#define mp_count_bits \
+ (tclTomMathStubsPtr->tclBN_mp_count_bits) /* 12 */
+#define mp_div \
+ (tclTomMathStubsPtr->tclBN_mp_div) /* 13 */
+#define mp_div_d \
+ (tclTomMathStubsPtr->tclBN_mp_div_d) /* 14 */
+#define mp_div_2 \
+ (tclTomMathStubsPtr->tclBN_mp_div_2) /* 15 */
+#define mp_div_2d \
+ (tclTomMathStubsPtr->tclBN_mp_div_2d) /* 16 */
+#define mp_div_3 \
+ (tclTomMathStubsPtr->tclBN_mp_div_3) /* 17 */
+#define mp_exch \
+ (tclTomMathStubsPtr->tclBN_mp_exch) /* 18 */
+#define mp_expt_d \
+ (tclTomMathStubsPtr->tclBN_mp_expt_d) /* 19 */
+#define mp_grow \
+ (tclTomMathStubsPtr->tclBN_mp_grow) /* 20 */
+#define mp_init \
+ (tclTomMathStubsPtr->tclBN_mp_init) /* 21 */
+#define mp_init_copy \
+ (tclTomMathStubsPtr->tclBN_mp_init_copy) /* 22 */
+#define mp_init_multi \
+ (tclTomMathStubsPtr->tclBN_mp_init_multi) /* 23 */
+#define mp_init_set \
+ (tclTomMathStubsPtr->tclBN_mp_init_set) /* 24 */
+#define mp_init_size \
+ (tclTomMathStubsPtr->tclBN_mp_init_size) /* 25 */
+#define mp_lshd \
+ (tclTomMathStubsPtr->tclBN_mp_lshd) /* 26 */
+#define mp_mod \
+ (tclTomMathStubsPtr->tclBN_mp_mod) /* 27 */
+#define mp_mod_2d \
+ (tclTomMathStubsPtr->tclBN_mp_mod_2d) /* 28 */
+#define mp_mul \
+ (tclTomMathStubsPtr->tclBN_mp_mul) /* 29 */
+#define mp_mul_d \
+ (tclTomMathStubsPtr->tclBN_mp_mul_d) /* 30 */
+#define mp_mul_2 \
+ (tclTomMathStubsPtr->tclBN_mp_mul_2) /* 31 */
+#define mp_mul_2d \
+ (tclTomMathStubsPtr->tclBN_mp_mul_2d) /* 32 */
+#define mp_neg \
+ (tclTomMathStubsPtr->tclBN_mp_neg) /* 33 */
+#define mp_or \
+ (tclTomMathStubsPtr->tclBN_mp_or) /* 34 */
+#define mp_radix_size \
+ (tclTomMathStubsPtr->tclBN_mp_radix_size) /* 35 */
+#define mp_read_radix \
+ (tclTomMathStubsPtr->tclBN_mp_read_radix) /* 36 */
+#define mp_rshd \
+ (tclTomMathStubsPtr->tclBN_mp_rshd) /* 37 */
+#define mp_shrink \
+ (tclTomMathStubsPtr->tclBN_mp_shrink) /* 38 */
+#define mp_set \
+ (tclTomMathStubsPtr->tclBN_mp_set) /* 39 */
+#define mp_sqr \
+ (tclTomMathStubsPtr->tclBN_mp_sqr) /* 40 */
+#define mp_sqrt \
+ (tclTomMathStubsPtr->tclBN_mp_sqrt) /* 41 */
+#define mp_sub \
+ (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */
+#define mp_sub_d \
+ (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */
+#define mp_to_unsigned_bin \
+ (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin) /* 44 */
+#define mp_to_unsigned_bin_n \
+ (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin_n) /* 45 */
+#define mp_toradix_n \
+ (tclTomMathStubsPtr->tclBN_mp_toradix_n) /* 46 */
+#define mp_unsigned_bin_size \
+ (tclTomMathStubsPtr->tclBN_mp_unsigned_bin_size) /* 47 */
+#define mp_xor \
+ (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */
+#define mp_zero \
+ (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */
+#define TclBN_reverse \
+ (tclTomMathStubsPtr->tclBN_reverse) /* 50 */
+#define TclBN_fast_s_mp_mul_digs \
+ (tclTomMathStubsPtr->tclBN_fast_s_mp_mul_digs) /* 51 */
+#define TclBN_fast_s_mp_sqr \
+ (tclTomMathStubsPtr->tclBN_fast_s_mp_sqr) /* 52 */
+#define mp_karatsuba_mul \
+ (tclTomMathStubsPtr->tclBN_mp_karatsuba_mul) /* 53 */
+#define mp_karatsuba_sqr \
+ (tclTomMathStubsPtr->tclBN_mp_karatsuba_sqr) /* 54 */
+#define mp_toom_mul \
+ (tclTomMathStubsPtr->tclBN_mp_toom_mul) /* 55 */
+#define mp_toom_sqr \
+ (tclTomMathStubsPtr->tclBN_mp_toom_sqr) /* 56 */
+#define TclBN_s_mp_add \
+ (tclTomMathStubsPtr->tclBN_s_mp_add) /* 57 */
+#define TclBN_s_mp_mul_digs \
+ (tclTomMathStubsPtr->tclBN_s_mp_mul_digs) /* 58 */
+#define TclBN_s_mp_sqr \
+ (tclTomMathStubsPtr->tclBN_s_mp_sqr) /* 59 */
+#define TclBN_s_mp_sub \
+ (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */
+#define mp_init_set_int \
+ (tclTomMathStubsPtr->tclBN_mp_init_set_int) /* 61 */
+#define mp_set_int \
+ (tclTomMathStubsPtr->tclBN_mp_set_int) /* 62 */
+#define mp_cnt_lsb \
+ (tclTomMathStubsPtr->tclBN_mp_cnt_lsb) /* 63 */
+#define mp_expt_d_ex \
+ (tclTomMathStubsPtr->tclBN_mp_expt_d_ex) /* 67 */
+#define mp_set_long_long \
+ (tclTomMathStubsPtr->tclBN_mp_set_long_long) /* 68 */
+#define mp_get_long_long \
+ (tclTomMathStubsPtr->tclBN_mp_get_long_long) /* 69 */
+#define mp_set_long \
+ (tclTomMathStubsPtr->tclBN_mp_set_long) /* 70 */
+#define mp_get_long \
+ (tclTomMathStubsPtr->tclBN_mp_get_long) /* 71 */
+#define mp_get_int \
+ (tclTomMathStubsPtr->tclBN_mp_get_int) /* 72 */
+#define mp_tc_and \
+ (tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
+#define mp_tc_or \
+ (tclTomMathStubsPtr->tclBN_mp_tc_or) /* 74 */
+#define mp_tc_xor \
+ (tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */
+#define mp_tc_div_2d \
+ (tclTomMathStubsPtr->tclBN_mp_tc_div_2d) /* 76 */
+#define mp_get_bit \
+ (tclTomMathStubsPtr->tclBN_mp_get_bit) /* 77 */
+#endif /* defined(USE_TCL_STUBS) */
+
+
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c
index 236a8cf..9639565 100644
--- a/generic/tclTomMathInterface.c
+++ b/generic/tclTomMathInterface.c
@@ -13,7 +13,7 @@
*/
#include "tclInt.h"
-#include "tommath.h"
+#include "tclTomMath.h"
MODULE_SCOPE const TclTomMathStubs tclTomMathStubs;
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 2889852..3875502 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -15,7 +15,7 @@
#include "tclInt.h"
#include "tclParse.h"
#include "tclStringTrim.h"
-#include "tommath.h"
+#include "tclTomMath.h"
#include <math.h>
/*
diff --git a/generic/tclVar.c b/generic/tclVar.c
index affc848..e400369 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -736,7 +736,7 @@ TclObjLookupVarEx(
* radical and destructive, so a better idea would be welcome.
*/
- /*
+ /*
* Firstly set cached local var reference (avoid free before set,
* see [45b9faf103f2])
*/
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 5a7abec..8dbe807 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -422,7 +422,7 @@ GenerateHeader(
{
Tcl_Obj *value;
int len, result = TCL_ERROR;
- Tcl_WideInt wideValue;
+ Tcl_WideInt wideValue = 0;
const char *valueStr;
Tcl_Encoding latin1enc;
static const char *const types[] = {
diff --git a/libtommath/win32/tommath.lib b/libtommath/win32/tommath.lib
index 8628471..bc866fb 100644
--- a/libtommath/win32/tommath.lib
+++ b/libtommath/win32/tommath.lib
Binary files differ
diff --git a/libtommath/win64/tommath.lib b/libtommath/win64/tommath.lib
new file mode 100755
index 0000000..9b0e7ad
--- /dev/null
+++ b/libtommath/win64/tommath.lib
Binary files differ
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 80258dc..5589e21 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -420,9 +420,9 @@ test cmdMZ-try-1.0 {
set cmd try
$cmd {
lindex 5
- } on ok res {}
+ } on ok res {}
set res
- }}
+ }}
} -result 5
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 74bee41..d9f9a2d 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -227,7 +227,6 @@ SRC_DIR = @srcdir@
TOP_DIR = @TCL_SRC_DIR@
BUILD_DIR = @builddir@
GENERIC_DIR = $(TOP_DIR)/generic
-TOMMATH_DIR = $(TOP_DIR)/libtommath
COMPAT_DIR = $(TOP_DIR)/compat
TOOL_DIR = $(TOP_DIR)/tools
UNIX_DIR = $(TOP_DIR)/unix
@@ -240,6 +239,8 @@ TCL_BUILDTIME_LIBRARY = @TCL_SRC_DIR@/library
ZLIB_DIR = ${COMPAT_DIR}/zlib
ZLIB_INCLUDE = @ZLIB_INCLUDE@
+TOMMATH_DIR = $(TOP_DIR)/libtommath
+TOMMATH_INCLUDE = @TOMMATH_INCLUDE@
CC = @CC@
OBJEXT = @OBJEXT@
@@ -367,7 +368,7 @@ ZLIB_OBJS = Zadler32.o Zcompress.o Zcrc32.o Zdeflate.o Zinfback.o \
TCL_OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} \
${OO_OBJS} @DL_OBJS@ @PLAT_OBJS@
-OBJS = ${TCL_OBJS} ${TOMMATH_OBJS} @DTRACE_OBJ@ @ZLIB_OBJS@
+OBJS = ${TCL_OBJS} @DTRACE_OBJ@ @ZLIB_OBJS@ @TOMMATH_OBJS@
TCL_DECLS = \
$(GENERIC_DIR)/tcl.decls \
@@ -626,8 +627,8 @@ ZLIB_SRCS = \
# won't compile on the current machine, and they will cause problems for
# things like "make depend".
-SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \
- $(OO_SRCS) $(STUB_SRCS) @PLAT_SRCS@ @ZLIB_SRCS@
+SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \
+ $(OO_SRCS) $(STUB_SRCS) @PLAT_SRCS@ @ZLIB_SRCS@ @TOMMATH_SRCS@
###
# Tip 430 - ZipFS Modifications
diff --git a/unix/configure b/unix/configure
index 8dc11f5..d310777 100755
--- a/unix/configure
+++ b/unix/configure
@@ -705,9 +705,9 @@ TCL_LIBS
LIBOBJS
AR
RANLIB
-LIBTOMMATH_INCLUDE
-LIBTOMMATH_SRCS
-LIBTOMMATH_OBJS
+TOMMATH_INCLUDE
+TOMMATH_SRCS
+TOMMATH_OBJS
ZLIB_INCLUDE
ZLIB_SRCS
ZLIB_OBJS
@@ -4695,9 +4695,9 @@ fi
if test $libtommath_ok = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mp_add" >&5
-$as_echo_n "checking for library containing mp_add... " >&6; }
-if ${ac_cv_search_mp_add+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mp_get_bit" >&5
+$as_echo_n "checking for library containing mp_get_bit... " >&6; }
+if ${ac_cv_search_mp_get_bit+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -4710,11 +4710,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char mp_add ();
+char mp_get_bit ();
int
main ()
{
-return mp_add ();
+return mp_get_bit ();
;
return 0;
}
@@ -4727,25 +4727,25 @@ for ac_lib in '' tommath; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_mp_add=$ac_res
+ ac_cv_search_mp_get_bit=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_mp_add+:} false; then :
+ if ${ac_cv_search_mp_get_bit+:} false; then :
break
fi
done
-if ${ac_cv_search_mp_add+:} false; then :
+if ${ac_cv_search_mp_get_bit+:} false; then :
else
- ac_cv_search_mp_add=no
+ ac_cv_search_mp_get_bit=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mp_add" >&5
-$as_echo "$ac_cv_search_mp_add" >&6; }
-ac_res=$ac_cv_search_mp_add
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mp_get_bit" >&5
+$as_echo "$ac_cv_search_mp_get_bit" >&6; }
+ac_res=$ac_cv_search_mp_get_bit
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -4758,11 +4758,11 @@ fi
fi
if test $libtommath_ok = no; then :
- LIBTOMMATH_OBJS=\${LIBTOMMATH_OBJS}
+ TOMMATH_OBJS=\${TOMMATH_OBJS}
- LIBTOMMATH_SRCS=\${LIBTOMMATH_SRCS}
+ TOMMATH_SRCS=\${TOMMATH_SRCS}
- LIBTOMMATH_INCLUDE=-I\${LIBTOMMATH_DIR}
+ TOMMATH_INCLUDE=-I\${TOMMATH_DIR}
fi
diff --git a/unix/configure.ac b/unix/configure.ac
index 9c4135b..a2ebecf 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -175,13 +175,13 @@ AC_CHECK_HEADER([tommath.h],[
AC_CHECK_TYPE([mp_int],[],[libtommath_ok=no],[#include <tommath.h>])],[
libtommath_ok=no])
AS_IF([test $libtommath_ok = yes], [
- AC_SEARCH_LIBS([mp_add],[tommath],[],[
+ AC_SEARCH_LIBS([mp_get_bit],[tommath],[],[
libtommath_ok=no
])])
AS_IF([test $libtommath_ok = no], [
- AC_SUBST(LIBTOMMATH_OBJS,[\${LIBTOMMATH_OBJS}])
- AC_SUBST(LIBTOMMATH_SRCS,[\${LIBTOMMATH_SRCS}])
- AC_SUBST(LIBTOMMATH_INCLUDE,[-I\${LIBTOMMATH_DIR}])
+ AC_SUBST(TOMMATH_OBJS,[\${TOMMATH_OBJS}])
+ AC_SUBST(TOMMATH_SRCS,[\${TOMMATH_SRCS}])
+ AC_SUBST(TOMMATH_INCLUDE,[-I\${TOMMATH_DIR}])
])
#--------------------------------------------------------------------
diff --git a/win/Makefile.in b/win/Makefile.in
index be1ef9d..6fd634e 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -102,6 +102,7 @@ WIN_DIR = $(TOP_DIR)/win
COMPAT_DIR = $(TOP_DIR)/compat
PKGS_DIR = $(TOP_DIR)/pkgs
ZLIB_DIR = $(COMPAT_DIR)/zlib
+MINIZIP_DIR = $(ZLIB_DIR)/contrib/minizip
TOMMATH_DIR = $(TOP_DIR)/libtommath
# Converts a POSIX path to a Windows native path.
@@ -117,6 +118,7 @@ WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)')
ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)')
ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W || pwd -P)
ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)')
+MINIZIP_DIR_NATIVE = $(shell $(CYGPATH) '$(MINIZIP_DIR)')
TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)')
# Fully qualify library path so that `make test`
@@ -642,7 +644,7 @@ tclZipfs.${OBJEXT}: $(GENERIC_DIR)/tclZipfs.c
-DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \
-DCFG_RUNTIME_LIBDIR="\"$(bindir_native)\"" \
-DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY_NATIVE)\"" \
- $(ZLIB_INCLUDE) -I$(ZLIB_DIR)/contrib/minizip @DEPARG@ $(CC_OBJNAME)
+ $(ZLIB_INCLUDE) -I$(MINIZIP_DIR_NATIVE) @DEPARG@ $(CC_OBJNAME)
# TIP #59, embedding of configuration information into the binary library.
@@ -700,49 +702,49 @@ tclWinPanic.${OBJEXT}: tclWinPanic.c
# Minizip implementation
#--------------------------------------------------------------------------
adler32.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/adler32.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/adler32.c
compress.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/compress.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/compress.c
crc32.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/crc32.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/crc32.c
deflate.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/deflate.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/deflate.c
ioapi.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -DIOAPI_NO_64 -I$(ZLIB_DIR) -I$(ZLIB_DIR)/contrib/minizip -c $(ZLIB_DIR)/contrib/minizip/ioapi.c
+ $(HOST_CC) -o $@ -DIOAPI_NO_64 -DUSE_FILE32API -I$(ZLIB_DIR_NATIVE) -I$(MINIZIP_DIR_NATIVE) -c $(MINIZIP_DIR_NATIVE)/ioapi.c
iowin32.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -I$(ZLIB_DIR)/contrib/minizip -c $(ZLIB_DIR)/contrib/minizip/iowin32.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -I$(MINIZIP_DIR_NATIVE) -c $(MINIZIP_DIR_NATIVE)/iowin32.c
infback.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/infback.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/infback.c
inffast.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/inffast.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/inffast.c
inflate.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/inflate.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/inflate.c
inftrees.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/inftrees.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/inftrees.c
trees.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/trees.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/trees.c
uncompr.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/uncompr.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/uncompr.c
zip.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -I$(ZLIB_DIR)/contrib/minizip -c $(ZLIB_DIR)/contrib/minizip/zip.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -I$(MINIZIP_DIR_NATIVE) -c $(MINIZIP_DIR_NATIVE)/zip.c
zutil.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -c $(ZLIB_DIR)/zutil.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -c $(ZLIB_DIR_NATIVE)/zutil.c
minizip.$(HOST_OBJEXT):
- $(HOST_CC) -o $@ -I$(ZLIB_DIR) -DIOAPI_NO_64 -I$(ZLIB_DIR)/contrib/minizip -c $(ZLIB_DIR)/contrib/minizip/minizip.c
+ $(HOST_CC) -o $@ -I$(ZLIB_DIR_NATIVE) -DIOAPI_NO_64 -DUSE_FILE32API -I$(MINIZIP_DIR_NATIVE) -c $(MINIZIP_DIR_NATIVE)/minizip.c
minizip${HOST_EXEEXT}: $(MINIZIP_OBJS)
$(HOST_CC) -o $@ $(MINIZIP_OBJS)
diff --git a/win/configure b/win/configure
index 716cf98..29dc6d6 100755
--- a/win/configure
+++ b/win/configure
@@ -4317,12 +4317,12 @@ else
-I\"${MSSDK}/Include/crt/sys\""
fi
- RC="\"${MSSDK}/bin/rc.exe\""
+ RC="rc"
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
- LINKBIN="\"${PATH64}/link.exe\""
+ LINKBIN="link"
# Avoid 'unresolved external symbol __security_cookie' errors.
# c.f. http://support.microsoft.com/?id=894573
LIBS="$LIBS bufferoverflowU.lib"
diff --git a/win/tcl.m4 b/win/tcl.m4
index c0dd539..9144e88 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -809,12 +809,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
[CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
-I\"${MSSDK}/Include/crt\" \
-I\"${MSSDK}/Include/crt/sys\""])
- RC="\"${MSSDK}/bin/rc.exe\""
+ RC="rc"
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
- LINKBIN="\"${PATH64}/link.exe\""
+ LINKBIN="link"
# Avoid 'unresolved external symbol __security_cookie' errors.
# c.f. http://support.microsoft.com/?id=894573
LIBS="$LIBS bufferoverflowU.lib"
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index 40be3d5..df76442 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -13,6 +13,7 @@
# define USE_TCL_STUBS
#endif
#include "tclInt.h"
+#include "tclTomMath.h"
/*
* For TestplatformChmod on Windows