From 3453a2204b07bfbc2ab42f2add7911f4c1bdb63c Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Wed, 24 Jul 2013 09:59:47 -0700 Subject: [PATCH] runtime: only define SEH when we need it. R=golang-dev, iant CC=golang-dev https://golang.org/cl/11769043 --- src/pkg/runtime/proc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 9626d7980c4..0e9785e4568 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -485,10 +485,14 @@ runtime·starttheworld(void) void runtime·mstart(void) { +#ifdef GOOS_windows +#ifdef GOARCH_386 // It is used by windows-386 only. Unfortunately, seh needs // to be located on os stack, and mstart runs on os stack // for both m0 and m. SEH seh; +#endif +#endif if(g != m->g0) runtime·throw("bad runtime·mstart");