[New-bugs-announce] [issue28267] [MinGW] Crash at start when compiled by MinGW for 64-bit Windows using PC/pyconfig.h

Vitaly Murashev report at bugs.python.org
Sun Sep 25 05:45:48 EDT 2016


New submission from Vitaly Murashev:

Hi,here the issue:
We (crystax.net) use custom builds of cpython,
which for windows are compiled by MinGW with pyconfig.h taken from PC/pyconfig.h
And for 32-bit Windows everything works well, but for 64-bit Windows - doesn't.

The root cause of this issue is actauly very simple:

Python code for windows is very sensitive on properly defined macro MS_WIN32/MS_WIN64
And while MS_WIN32 is predefined unconditionally in PC/pyconfig.h,
the MS_WIN64 is defined only in conjunction with _MSC_VER, like

#ifdef _MSC_VER
...
#ifdef _WIN64
#define MS_WIN64
#endif
...
#endif /* _MSC_VER */

So suggested patch (for 3.5.2 and 2.7.12) just appropriately define MS_WIN64 for MinGW

----------
components: Build, Windows
files: pyconfig.h.3.5.mingw.patch
keywords: patch
messages: 277352
nosy: paul.moore, steve.dower, tim.golden, vmurashev, zach.ware
priority: normal
severity: normal
status: open
title: [MinGW] Crash at start when compiled by MinGW for 64-bit Windows using PC/pyconfig.h
Added file: http://bugs.python.org/file44805/pyconfig.h.3.5.mingw.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28267>
_______________________________________


More information about the New-bugs-announce mailing list