From 625887e6df5dbebe48be172b424ba519e2ba2ddc Mon Sep 17 00:00:00 2001 From: Christopher Chavez Date: Fri, 19 May 2023 14:09:59 -0500 Subject: [PATCH] gh-103839: Allow building Tkinter against Tcl 8.7 without external libtommath (GH-103842) --- .../Library/2023-04-25-16-31-00.gh-issue-103839.tpyLhI.rst | 2 ++ Modules/_tkinter.c | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2023-04-25-16-31-00.gh-issue-103839.tpyLhI.rst 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 00000000000000..1d40a8fbcd3f59 --- /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 4dada0b28f0559..49c94447c7237c 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 #if !(defined(MS_WINDOWS) || defined(__CYGWIN__))