mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-131082: Add missing guards for WIN32_LEAN_AND_MEAN (GH-131044) (#131084)
(cherry picked from commit de8818ae23
)
Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
This commit is contained in:
parent
27fd328cf6
commit
f9d19a3ada
6 changed files with 16 additions and 6 deletions
|
@ -31,7 +31,9 @@
|
||||||
#define Py_HAVE_CONDVAR
|
#define Py_HAVE_CONDVAR
|
||||||
|
|
||||||
/* include windows if it hasn't been done before */
|
/* include windows if it hasn't been done before */
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h> // CRITICAL_SECTION
|
#include <windows.h> // CRITICAL_SECTION
|
||||||
|
|
||||||
/* options */
|
/* options */
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
#include "pycore_pythread.h" // _POSIX_SEMAPHORES
|
#include "pycore_pythread.h" // _POSIX_SEMAPHORES
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#elif defined(HAVE_PTHREAD_H)
|
#elif defined(HAVE_PTHREAD_H)
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
#include "pycore_pystate.h" // _PyInterpreterState_GetIDObject()
|
#include "pycore_pystate.h" // _PyInterpreterState_GetIDObject()
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h> // SwitchToThread()
|
#include <windows.h> // SwitchToThread()
|
||||||
#elif defined(HAVE_SCHED_H)
|
#elif defined(HAVE_SCHED_H)
|
||||||
#include <sched.h> // sched_yield()
|
#include <sched.h> // sched_yield()
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <stddef.h> /* For offsetof */
|
#include <stddef.h> /* For offsetof */
|
||||||
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
#include "pycore_time.h" // _PyTime_Add()
|
#include "pycore_time.h" // _PyTime_Add()
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
# include <windows.h> // SwitchToThread()
|
# include <windows.h> // SwitchToThread()
|
||||||
#elif defined(HAVE_SCHED_H)
|
#elif defined(HAVE_SCHED_H)
|
||||||
# include <sched.h> // sched_yield()
|
# include <sched.h> // sched_yield()
|
||||||
|
|
|
@ -44,7 +44,9 @@ Data members:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif /* MS_WINDOWS */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue