Skip to content

Commit e1507e0

Browse files
committed
Prepare to switch on platform_dispatchers (part 1)
664a0b8555cd24bd063b0fa871e3e5693e856e7d
1 parent 6b574da commit e1507e0

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Override _WIN32_WINNT
2+
#undef _WIN32_WINNT
3+
#define _WIN32_WINNT Py_WINVER
4+
5+
#define Py_NO_ENABLE_SHARED
6+
7+
#include "../PC/pyconfig.h"

contrib/tools/python3/Include/pyconfig.h

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,21 @@
2525

2626
#endif
2727

28-
#if defined(__linux__)
29-
#include "pyconfig-linux.h"
28+
#if !defined(NDEBUG) && !defined(Py_DEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
29+
#define Py_DEBUG
30+
#define GC_NDEBUG
3031
#endif
3132

3233
#if defined(__APPLE__) && (defined(__aarch64__) || defined(_M_ARM64))
3334
# include "pyconfig-osx-arm64.h"
3435
#elif defined(__APPLE__) && (defined(__x86_64__) || defined(_M_X64))
3536
# include "pyconfig-osx-x86_64.h"
36-
#endif
37-
38-
#if defined(_MSC_VER)
39-
#define NTDDI_VERSION 0x06020000
40-
#define _WIN32_WINNT 0x0602
41-
#define Py_NO_ENABLE_SHARED
42-
#include "../PC/pyconfig.h"
37+
#elif defined(_MSC_VER)
38+
# include "pyconfig-win.h"
39+
#else
40+
# include "pyconfig-linux.h"
4341
#endif
4442

4543
#if defined(_musl_)
46-
#include "pyconfig-musl.h"
47-
#endif
48-
49-
#if !defined(NDEBUG) && !defined(Py_DEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
50-
#define Py_DEBUG
51-
#define GC_NDEBUG
44+
# include "pyconfig-musl.h"
5245
#endif

0 commit comments

Comments
 (0)