#define Py_HAVE_CONDVAR
/* 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
/* options */
#include "pycore_pythread.h" // _POSIX_SEMAPHORES
#ifdef MS_WINDOWS
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
# include <windows.h>
#elif defined(HAVE_PTHREAD_H)
# include <pthread.h>
#include "pycore_pystate.h" // _PyInterpreterState_GetIDObject()
#ifdef MS_WINDOWS
-#define WIN32_LEAN_AND_MEAN
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
#include <windows.h> // SwitchToThread()
#elif defined(HAVE_SCHED_H)
#include <sched.h> // sched_yield()
#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>
#include "pycore_time.h" // _PyTime_Add()
#ifdef MS_WINDOWS
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
# include <windows.h> // SwitchToThread()
#elif defined(HAVE_SCHED_H)
# include <sched.h> // sched_yield()
#endif
#ifdef MS_WINDOWS
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
# include <windows.h>
#endif /* MS_WINDOWS */