Index: otp/erts/emulator/sys/win32/sys_float.c =================================================================== --- otp.orig/erts/emulator/sys/win32/sys_float.c 2012-12-17 11:16:44.738149200 +0200 +++ otp/erts/emulator/sys/win32/sys_float.c 2012-12-17 11:26:58.456899200 +0200 @@ -31,10 +31,19 @@ static void fpe_exception(int sig); +#if defined(__MINGW_GCC_VERSION) +int erts_matherr(struct _exception *exc); void erts_sys_init_float(void) { + __mingw_setusermatherr(erts_matherr); } +#else +void +erts_sys_init_float(void) +{ +} +#endif void erts_thread_init_float(void) { } @@ -133,8 +142,13 @@ return s-buf; /* i.e strlen(buf) */ } +#if defined(__MINGW_GCC_VERSION) +int +erts_matherr(struct _exception *exc) +#else int matherr(struct _exception *exc) +#endif { erl_fp_exception = 1; DEBUGF(("FP exception (matherr) (0x%x) (%d)\n", exc->type, erl_fp_exception)); Index: otp/lib/wx/c_src/Makefile.in =================================================================== --- otp.orig/lib/wx/c_src/Makefile.in 2012-12-17 11:19:08.628774200 +0200 +++ otp/lib/wx/c_src/Makefile.in 2012-12-17 11:26:58.488149200 +0200 @@ -110,7 +110,7 @@ CC_O = $(CC) -c $(CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS) OBJC_CC_O = $(OBJC_CC) -c $(CFLAGS) $(OBJC_CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS) -CPP_O = $(CPP) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS) +CPP_O = $(CPP) -c -fpermissive $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS) ifeq ($(SYS_TYPE),win32) GL_LIBS = -lopengl32 -lglu32