summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-18 12:47:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-18 12:47:18 (GMT)
commit61d8bcc4f631c8b3bd8a14a2a8bf68d7c0749809 (patch)
tree0bbf3be30525b4cb84914f0019d331125a81ec16 /generic/tclTest.c
parent4f9fc86e5d0f464283c34d96b2bcec28ac0458c8 (diff)
downloadtcl-61d8bcc4f631c8b3bd8a14a2a8bf68d7c0749809.zip
tcl-61d8bcc4f631c8b3bd8a14a2a8bf68d7c0749809.tar.gz
tcl-61d8bcc4f631c8b3bd8a14a2a8bf68d7c0749809.tar.bz2
If Tcl is built with external libtommath (TCL_WITH_EXTERNAL_TOMMATH is defined), do the tests with the external libtommath too.
Also, don't try to include <tommath.h> if BN_H_ is already defined.
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index a6c3b83..8cca744 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -20,7 +20,11 @@
# define USE_TCL_STUBS
#endif
#include "tclInt.h"
-#include "tclTomMath.h"
+#ifdef TCL_WITH_EXTERNAL_TOMMATH
+# include "tommath.h"
+#else
+# include "tclTomMath.h"
+#endif
#include "tclOO.h"
#include <math.h>
@@ -446,9 +450,11 @@ Tcltest_Init(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
+#ifndef TCL_WITH_EXTERNAL_TOMMATH
if (Tcl_TomMath_InitStubs(interp, "8.5-") == NULL) {
return TCL_ERROR;
}
+#endif
if (Tcl_OOInitStubs(interp) == NULL) {
return TCL_ERROR;
}