summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-28 16:09:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-28 16:09:38 (GMT)
commitba1f0d37e16ba063e54ea9243902d9bcfe3d7d19 (patch)
treeb6e2e88170caa39972bb1785a8c63367badf023f /libtommath/tommath.h
parent6e88a507713225ea0ef8e50e3e0c4feba8b7404f (diff)
downloadtcl-ba1f0d37e16ba063e54ea9243902d9bcfe3d7d19.zip
tcl-ba1f0d37e16ba063e54ea9243902d9bcfe3d7d19.tar.gz
tcl-ba1f0d37e16ba063e54ea9243902d9bcfe3d7d19.tar.bz2
Don't typedef mp_digit in tcl.h anymore, it is supposed to be brought in from tclTomMath.h.
Add test in configure scripts for <stdint.h> and <stdbool.h>. Not used by Tcl yet, probably handy for TEA extensions wanting to use that ;-)
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r--libtommath/tommath.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index 82330c3..285fc8a 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -32,7 +32,7 @@ extern "C" {
#endif
/* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */
-#if (defined(_WIN32) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)) && !defined(MP_64BIT)
+#if (defined(_MSC_VER) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)) && !defined(MP_32BIT) && !defined(MP_64BIT)
# define MP_32BIT
#endif
@@ -74,7 +74,7 @@ typedef unsigned short mp_digit;
# define MP_DIGIT_BIT 15
#elif defined(MP_64BIT)
/* for GCC only on supported platforms */
-typedef Tcl_WideUInt mp_digit;
+typedef unsigned long long mp_digit;
# define MP_DIGIT_BIT 60
#else
typedef unsigned int mp_digit;
@@ -148,6 +148,7 @@ typedef int mp_err;
#define MP_ERR -1 /* unknown error */
#define MP_MEM -2 /* out of mem */
#define MP_VAL -3 /* invalid input */
+#define MP_RANGE (MP_DEPRECATED_PRAGMA("MP_RANGE has been deprecated in favor of MP_VAL") MP_VAL)
#define MP_ITER -4 /* maximum iterations reached */
#define MP_BUF -5 /* buffer overflow, supplied buffer too small */
typedef int mp_order;