Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-04-22
17:46 • Closed ticket [2a5cb49733]: Make TCL_NO_TOMMATH_H sufficient for tclTomMathDecls... artifact: 9829fb1767 user: jan.nijtmans
16:34
Fix [2a5cb49733ff]: Make TCL_NO_TOMMATH_H sufficient for tclTomMathDecls.h check-in: ecd4fdf4d7 user: jan.nijtmans tags: core-8-branch
13:42 • Ticket [ff255adc4c] More on libtommath - this time with Python status still ... artifact: 87496a2b95 user: chrstphrchvz
12:41 • New ticket [2a5cb49733] Make TCL_NO_TOMMATH_H sufficient for tclTomMathDecls.h</... artifact: fbec7a1e1d user: chrstphrchvz

Make TCL_NO_TOMMATH_H sufficient for tclTomMathDecls.h

Closed / Fixed2a5cb49733ffc8314a841c88c7e84040c29651f1Created 4 years agoUpdated 4 years ago
Descriptionwiki2023-04-22 12:41:50
As an alternative solution for [ff255adc4cb5], I tried defining TCL_NO_TOMMATH_H (from [1baf516ed4f1]), but tclTomMathDecls.h still needs mp_order, mp_endian, and MP_DEPRECATED_PRAGMA(). Copying over those (along with a few related definitions) is enough:
--- generic/tclTomMath.h.orig
+++ generic/tclTomMath.h
@@ -24,6 +24,14 @@
 #   define MP_VAL        -3  /* invalid input */
 #   define MP_ITER       -4  /* maximum iterations reached */
 #   define MP_BUF        -5  /* buffer overflow, supplied buffer too small */
+    typedef int mp_order;
+#   define MP_LSB_FIRST -1
+#   define MP_MSB_FIRST  1
+    typedef int mp_endian;
+#   define MP_LITTLE_ENDIAN  -1
+#   define MP_NATIVE_ENDIAN  0
+#   define MP_BIG_ENDIAN     1
+#   define MP_DEPRECATED_PRAGMA(s) /* nothing */
 #   define MP_WUR            /* nothing */
 #   define mp_iszero(a) ((a)->used == 0)
 #   define mp_isneg(a)  ((a)->sign != 0)
jan.nijtmanswiki2023-04-22 17:46:14

Good suggestion. Thanks! I see no reason to reject this suggestion.

Log in (anonymous is fine) to add a comment.