gh-102255: Improve build support for Windows API partitions (GH-102256)

Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs).
CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes.
`MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
This commit is contained in:
Max Bachmann 2023-03-09 22:09:12 +01:00 committed by GitHub
parent ca066bdbed
commit c6858d1e7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 633 additions and 100 deletions

View file

@ -42,6 +42,12 @@ enum {
#define FLOAT FLOAT_
#define INT INT_
#define LONG LONG_
/* This can already be defined on Windows to set the character set
the Windows header files treat as default */
#ifdef UNICODE
#undef UNICODE
#endif
#endif
/* Pickle opcodes. These must be kept updated with pickle.py.