From 999ee5ff8057ee73db93a43adf9e3c02661bc9c0 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Mon, 10 Jun 2024 23:17:22 +0300 Subject: [PATCH 1/5] include intrih.h on windows --- Include/object.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Include/object.h b/Include/object.h index c8c63b9b2b1450..2e69df3c24bbcd 100644 --- a/Include/object.h +++ b/Include/object.h @@ -4,6 +4,9 @@ extern "C" { #endif +#if defined(_MSC_VER) +#include +#endif /* Object and type object interface */ From 4532019e528f05448beac8103d7c6fa3138b6b98 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Tue, 11 Jun 2024 00:39:36 +0300 Subject: [PATCH 2/5] Add a NEWS entry --- .../next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst diff --git a/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst b/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst new file mode 100644 index 00000000000000..93f21c26216438 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst @@ -0,0 +1,2 @@ +Fix build error on Windows when ``--disable-gil`` and ``--experimental-jit`` +options are combined. From 12bed42415614ab37dcfe0dd0f4ebaf9b292b461 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Tue, 11 Jun 2024 16:12:06 +0300 Subject: [PATCH 3/5] Update Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst Co-authored-by: Victor Stinner --- .../next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst b/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst index 93f21c26216438..25cbdf6ba50ab8 100644 --- a/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst +++ b/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst @@ -1,2 +1,2 @@ -Fix build error on Windows when ``--disable-gil`` and ``--experimental-jit`` +On Windows, fix build error when ``--disable-gil`` and ``--experimental-jit`` options are combined. From 17e9a4aca7de2b84f1eec28c723c712baa83f6c1 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Tue, 11 Jun 2024 16:12:15 +0300 Subject: [PATCH 4/5] Update Include/object.h Co-authored-by: Victor Stinner --- Include/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/object.h b/Include/object.h index 2e69df3c24bbcd..57592db8efa1c2 100644 --- a/Include/object.h +++ b/Include/object.h @@ -5,7 +5,7 @@ extern "C" { #endif #if defined(_MSC_VER) -#include +# include #endif /* Object and type object interface */ From 5a1dd9c6abad1acd526adc24fdd55060dd5ca58d Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Tue, 11 Jun 2024 18:25:34 +0300 Subject: [PATCH 5/5] Move `include` to `Pytho.h` --- Include/Python.h | 4 ++++ Include/object.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Include/Python.h b/Include/Python.h index 502c5ec5aeaa3c..a1b33f6d3c42b2 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -51,6 +51,10 @@ # error "The limited API is not currently supported in the free-threaded build" #endif +#if defined(Py_GIL_DISABLED) && defined(_MSC_VER) +# include // __readgsqword() +#endif + // Include Python header files #include "pyport.h" #include "pymacro.h" diff --git a/Include/object.h b/Include/object.h index 57592db8efa1c2..c8c63b9b2b1450 100644 --- a/Include/object.h +++ b/Include/object.h @@ -4,9 +4,6 @@ extern "C" { #endif -#if defined(_MSC_VER) -# include -#endif /* Object and type object interface */