8000 [3.12] gh-131082: Add missing guards for WIN32_LEAN_AND_MEAN (#131044) by vstinner · Pull Request #131085 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-131082: Add missing guards for WIN32_LEAN_AND_MEAN (#131044) #131085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Include/internal/pycore_condvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
#define Py_HAVE_CONDVAR

/* include windows if it hasn't been done before */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> // CRITICAL_SECTION

/* options */
/* non-emulated condition variables are provided for those that want
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/winconsoleio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <stddef.h> /* For offsetof */

#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <fcntl.h>
Expand Down
6 changes: 4 additions & 2 deletions Python/sysmodule.c
53DD
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ Data members:
#include <locale.h>

#ifdef MS_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
#endif /* MS_WINDOWS */

#ifdef MS_COREDLL
Expand Down
Loading
0