Index: otp/erts/emulator/sys/win32/sys_float.c =================================================================== --- otp.orig/erts/emulator/sys/win32/sys_float.c 2013-05-11 13:50:24.000000000 +0300 +++ otp/erts/emulator/sys/win32/sys_float.c 2013-05-11 13:51:40.368541000 +0300 @@ -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) { } @@ -134,8 +143,13 @@ return s-buffer; /* i.e strlen(buffer) */ } +#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/erts/etc/win32/erl.c =================================================================== --- otp.orig/erts/etc/win32/erl.c 2013-05-11 13:49:38.000000000 +0300 +++ otp/erts/etc/win32/erl.c 2013-05-11 13:51:40.415416900 +0300 @@ -218,9 +218,8 @@ free(dir); if (p == NULL) { error("Cannot find erlexec.exe"); - } else { - return p; } + return p; } static void get_parameters(void) Index: otp/erts/etc/win32/win_erlexec.c =================================================================== --- otp.orig/erts/etc/win32/win_erlexec.c 2013-05-11 13:50:24.000000000 +0300 +++ otp/erts/etc/win32/win_erlexec.c 2013-05-11 13:51:40.431042200 +0300 @@ -111,6 +111,7 @@ } } +void free_env_val(char *value) { if (value) Index: otp/lib/odbc/c_src/Makefile.in =================================================================== --- otp.orig/lib/odbc/c_src/Makefile.in 2013-05-11 13:51:27.212038400 +0300 +++ otp/lib/odbc/c_src/Makefile.in 2013-05-11 13:51:40.446667500 +0300 @@ -22,6 +22,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk USING_MINGW=@MIXED_CYGWIN_MINGW@ +BITS64=@BITS64@ ifeq ($(TYPE),debug) TYPEMARKER = .debug @@ -59,7 +60,9 @@ ENTRY_OBJ=$(ERL_TOP)/erts/obj/$(TARGET)/port_entry.o PORT_ENTRY_POINT=erl_port_entry ifeq ($(USING_MINGW), yes) +ifneq ($(BITS64), yes) ENTRY_LDFLAGS=-Xlinker --thumb-entry=$(PORT_ENTRY_POINT) +endif else ENTRY_LDFLAGS=-entry:$(PORT_ENTRY_POINT) endif Index: otp/lib/odbc/c_src/odbcserver.c =================================================================== --- otp.orig/lib/odbc/c_src/odbcserver.c 2013-05-11 13:49:38.000000000 +0300 +++ otp/lib/odbc/c_src/odbcserver.c 2013-05-11 13:52:07.465002400 +0300 @@ -133,7 +133,7 @@ /* ---------------- Main functions ---------------------------------------*/ static void spawn_sup(const char *port); #ifdef WIN32 -DWORD WINAPI database_handler(const char *port); +void WINAPI database_handler(const char *port); #else void database_handler(const char *port); #endif @@ -340,9 +340,9 @@ } #ifdef WIN32 -DWORD WINAPI database_handler(const char *port) +void WINAPI database_handler(const char *port) #else - void database_handler(const char *port) +void database_handler(const char *port) #endif { db_result_msg msg; Index: otp/lib/odbc/configure.in =================================================================== --- otp.orig/lib/odbc/configure.in 2013-05-11 13:49:38.000000000 +0300 +++ otp/lib/odbc/configure.in 2013-05-11 13:51:40.477918100 +0300 @@ -217,4 +217,11 @@ LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS]) fi +BITS64= + +if test $ac_cv_sizeof_void_p = 8; then + BITS64=yes +fi +AC_SUBST(BITS64) + AC_OUTPUT(c_src/$host/Makefile:c_src/Makefile.in) Index: otp/lib/wx/c_src/Makefile.in =================================================================== --- otp.orig/lib/wx/c_src/Makefile.in 2013-05-11 13:51:27.305790200 +0300 +++ otp/lib/wx/c_src/Makefile.in 2013-05-11 13:52:23.158407700 +0300 @@ -109,7 +109,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