Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Unified Diff: Modules/faulthandler.c

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Modules/_cursesmodule.c ('k') | Modules/_freeze_importlib.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/faulthandler.c Thu Dec 27 23:52:36 2012 +0200
+++ b/Modules/faulthandler.c Thu Dec 27 17:35:12 2012 -0500
@@ -857,11 +857,24 @@
static PyObject *
faulthandler_sigabrt(PyObject *self, PyObject *args)
{
-#ifdef _MSC_VER
- /* Visual Studio: configure abort() to not display an error message nor
+#ifdef MS_WINDOWS
+ /* configure abort() to not display an error message nor
open a popup asking to report the fault. */
+#if defined(__MINGW32__) && !defined(HAVE_REPARSE_DATA_BUFFER) && __MSVCRT_VERSION__ < 0x0900
+ /* NOTE for mingw* build:
+ - mingw w32api define _WRITE_ABORT_MSG and function
+ _set_abort_behavior(..) if CRT >= 8.0
+ - mingw-w64 api define _WRITE_ABORT_MSG unconditionaly(!)
+ but function is available in CRT >= 9
+ - we use HAVE_REPARSE_DATA_BUFFER to distinguish
+ between both api (ref to configure&posixmodue.c)
+ */
+# undef _WRITE_ABORT_MSG
+#endif
+#ifdef _WRITE_ABORT_MSG
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif
+#endif
abort();
Py_RETURN_NONE;
}
« no previous file with comments | « Modules/_cursesmodule.c ('k') | Modules/_freeze_importlib.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+