summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/builtinimport.c4
-rw-r--r--py/nlrx86.S4
-rw-r--r--py/objfun.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 262ee04a53..4a2f6510c3 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -3,6 +3,10 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
+#ifdef __MINGW32__
+// For alloca()
+#include <malloc.h>
+#endif
#include "nlr.h"
#include "misc.h"
diff --git a/py/nlrx86.S b/py/nlrx86.S
index 003de5095f..145bdb9da0 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -61,7 +61,11 @@ nlr_jump:
#endif
mov nlr_top, %edx # load nlr_top
test %edx, %edx # check for nlr_top being NULL
+#ifdef _WIN32
+ je _nlr_jump_fail # fail if nlr_top is NULL
+#else
je nlr_jump_fail # fail if nlr_top is NULL
+#endif
mov 4(%esp), %eax # load return value
mov %eax, 4(%edx) # store return value
mov (%edx), %eax # load prev nlr_top
diff --git a/py/objfun.c b/py/objfun.c
index c7144f3078..940b64a66e 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -2,6 +2,10 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#ifdef __MINGW32__
+// For alloca()
+#include <malloc.h>
+#endif
#include "nlr.h"
#include "misc.h"