summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Chavez <chrischavez@gmx.us>2023-05-19 19:09:59 (GMT)
committerGitHub <noreply@github.com>2023-05-19 19:09:59 (GMT)
commit625887e6df5dbebe48be172b424ba519e2ba2ddc (patch)
tree90d0b01ffa46ba436af44a18b369038509fb361b
parent486bc8e03019b8edc3cbfc6e64db96d65dbe13b6 (diff)
downloadcpython-625887e6df5dbebe48be172b424ba519e2ba2ddc.zip
cpython-625887e6df5dbebe48be172b424ba519e2ba2ddc.tar.gz
cpython-625887e6df5dbebe48be172b424ba519e2ba2ddc.tar.bz2
gh-103839: Allow building Tkinter against Tcl 8.7 without external libtommath (GH-103842)
-rw-r--r--Misc/NEWS.d/next/Library/2023-04-25-16-31-00.gh-issue-103839.tpyLhI.rst2
-rw-r--r--Modules/_tkinter.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-04-25-16-31-00.gh-issue-103839.tpyLhI.rst b/Misc/NEWS.d/next/Library/2023-04-25-16-31-00.gh-issue-103839.tpyLhI.rst
new file mode 100644
index 0000000..1d40a8f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-04-25-16-31-00.gh-issue-103839.tpyLhI.rst
@@ -0,0 +1,2 @@
+Avoid compilation error due to tommath.h not being found when building
+Tkinter against Tcl 8.7 built with bundled libtommath.
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 4dada0b..49c9444 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -60,6 +60,9 @@ Copyright (C) 1994 Steen Lumholt.
#error "Tk older than 8.5.12 not supported"
#endif
+#ifndef TCL_WITH_EXTERNAL_TOMMATH
+#define TCL_NO_TOMMATH_H
+#endif
#include <tclTomMath.h>
#if !(defined(MS_WINDOWS) || defined(__CYGWIN__))