Skip to content

Commit

Permalink
Define MS_WINDOWS (and others) when compiling with MINGW
Browse files Browse the repository at this point in the history
This is used throughout the Python code but is not defined
when compiling with Mingw-w64 compilers, so define it.

Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
  • Loading branch information
Alexpux and lazka committed Aug 25, 2023
1 parent 3dca801 commit caf9902
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@
#endif


#ifdef __MINGW32__
/* Translate GCC[mingw*] platform specific defines to those
* used in python code.
*/
#if !defined(MS_WIN64) && defined(_WIN64)
# define MS_WIN64
#endif
#if !defined(MS_WIN32) && defined(_WIN32)
# define MS_WIN32
#endif
#if !defined(MS_WINDOWS) && defined(MS_WIN32)
# define MS_WINDOWS
#endif
#endif /* __MINGW32__*/

/**************************************************************************
Symbols and macros to supply platform-independent interfaces to basic
C language & library operations whose spellings vary across platforms.
Expand Down

0 comments on commit caf9902

Please sign in to comment.