From 7b3596ba1521f201c9416fc7a0385cb7e6c6f495 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Feb 2011 17:29:46 +0100 Subject: Build Win64 Erlang emulator using MSYS Still does not run, just compiles. --- erts/emulator/sys/win32/erl_win32_sys_ddll.c | 3 +++ erts/emulator/sys/win32/erl_win_sys.h | 7 ------- erts/emulator/sys/win32/sys_float.c | 3 +++ erts/emulator/sys/win32/sys_interrupt.c | 3 +++ erts/emulator/sys/win32/sys_time.c | 3 +++ 5 files changed, 12 insertions(+), 7 deletions(-) (limited to 'erts/emulator/sys/win32') diff --git a/erts/emulator/sys/win32/erl_win32_sys_ddll.c b/erts/emulator/sys/win32/erl_win32_sys_ddll.c index a19f49af10..ec51cfea51 100644 --- a/erts/emulator/sys/win32/erl_win32_sys_ddll.c +++ b/erts/emulator/sys/win32/erl_win32_sys_ddll.c @@ -25,6 +25,9 @@ #include #define GET_ERTS_ALC_TEST +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "sys.h" #include "global.h" #include "erl_alloc.h" diff --git a/erts/emulator/sys/win32/erl_win_sys.h b/erts/emulator/sys/win32/erl_win_sys.h index 92d8577537..ef4c65f0a7 100644 --- a/erts/emulator/sys/win32/erl_win_sys.h +++ b/erts/emulator/sys/win32/erl_win_sys.h @@ -191,13 +191,6 @@ int _finite(double x); #define erts_sys_block_fpe() 0 #define erts_sys_unblock_fpe(x) do{}while(0) -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 4 -#define SIZEOF_VOID_P 4 -#define SIZEOF_SIZE_T 4 -#define SIZEOF_OFF_T 4 - /* * Seems to be missing. */ diff --git a/erts/emulator/sys/win32/sys_float.c b/erts/emulator/sys/win32/sys_float.c index 9e67ca7f48..6c03821f3b 100644 --- a/erts/emulator/sys/win32/sys_float.c +++ b/erts/emulator/sys/win32/sys_float.c @@ -18,6 +18,9 @@ */ /* Float conversions */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "sys.h" #include "signal.h" diff --git a/erts/emulator/sys/win32/sys_interrupt.c b/erts/emulator/sys/win32/sys_interrupt.c index 93aaa23f97..347c31053b 100644 --- a/erts/emulator/sys/win32/sys_interrupt.c +++ b/erts/emulator/sys/win32/sys_interrupt.c @@ -19,6 +19,9 @@ /* * Purpose: Interrupt handling in windows. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "sys.h" #include "erl_alloc.h" #include "erl_thr_progress.h" diff --git a/erts/emulator/sys/win32/sys_time.c b/erts/emulator/sys/win32/sys_time.c index 50e43065b5..fc868507cb 100644 --- a/erts/emulator/sys/win32/sys_time.c +++ b/erts/emulator/sys/win32/sys_time.c @@ -20,6 +20,9 @@ * Purpose: System-dependent time functions. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "sys.h" #include "assert.h" -- cgit v1.2.3 From e04704b1f40511a6e1090b4cb04ef543580cdcc7 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 15 Nov 2011 20:10:21 +0100 Subject: Iron out bugs in Win64 found in daily builds Almost all uses of the 'long' datatype is removed from VM and tests Emulator test now runs w/o drivers crashing Nasty abs bug fixed in VM as well as type errors in allocator debug functions Still one allocator test that fails, domain knowledge is needed to fix that. Fix type inconsistency in beam_load causing crashes --- erts/emulator/sys/win32/erl_win_dyn_driver.h | 8 ++++---- erts/emulator/sys/win32/erl_win_sys.h | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'erts/emulator/sys/win32') diff --git a/erts/emulator/sys/win32/erl_win_dyn_driver.h b/erts/emulator/sys/win32/erl_win_dyn_driver.h index ecb06868d5..afc72bb898 100644 --- a/erts/emulator/sys/win32/erl_win_dyn_driver.h +++ b/erts/emulator/sys/win32/erl_win_dyn_driver.h @@ -83,10 +83,10 @@ WDD_TYPEDEF(void *, driver_dl_open, (char *)); WDD_TYPEDEF(void *, driver_dl_sym, (void *, char *)); WDD_TYPEDEF(int, driver_dl_close, (void *)); WDD_TYPEDEF(char *, driver_dl_error, (void)); -WDD_TYPEDEF(unsigned long, erts_alc_test, (unsigned long, - unsigned long, - unsigned long, - unsigned long)); +WDD_TYPEDEF(ErlDrvUInt, erts_alc_test, (ErlDrvUInt, + ErlDrvUInt, + ErlDrvUInt, + ErlDrvUInt)); WDD_TYPEDEF(ErlDrvSInt, driver_binary_get_refc, (ErlDrvBinary *dbp)); WDD_TYPEDEF(ErlDrvSInt, driver_binary_inc_refc, (ErlDrvBinary *dbp)); WDD_TYPEDEF(ErlDrvSInt, driver_binary_dec_refc, (ErlDrvBinary *dbp)); diff --git a/erts/emulator/sys/win32/erl_win_sys.h b/erts/emulator/sys/win32/erl_win_sys.h index ef4c65f0a7..d770691026 100644 --- a/erts/emulator/sys/win32/erl_win_sys.h +++ b/erts/emulator/sys/win32/erl_win_sys.h @@ -169,10 +169,12 @@ void erts_sys_env_init(void); extern volatile int erl_fp_exception; #include -#if defined (__GNUC__) +/* I suspect this test isn't right, it might depend on the version of GCC + rather than if it's a MINGW gcc, but I havent been able to pinpoint the + exact point where _finite was added to the headers in cygwin... */ +#if defined (__GNUC__) && !defined(__MINGW32__) int _finite(double x); #endif -#endif /*#define NO_FPE_SIGNALS*/ #define erts_get_current_fp_exception() NULL @@ -203,3 +205,4 @@ typedef long ssize_t; int init_async(int); int exit_async(void); #endif +#endif -- cgit v1.2.3 From d1a8bdbe2c9df1079e70342e020fe00a80e3d7c3 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 16 Nov 2011 14:58:58 +0100 Subject: Remove ancient WaitForInputIdle workaround --- erts/emulator/sys/win32/sys.c | 11 ----------- 1 file changed, 11 deletions(-) mode change 100644 => 100755 erts/emulator/sys/win32/sys.c (limited to 'erts/emulator/sys/win32') diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c old mode 100644 new mode 100755 index 6f33ef7ad6..a49fa8ca34 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -1634,17 +1634,6 @@ create_child_process WaitForSingleObject(hProcess, 50); } - /* - * When an application spawns a process repeatedly, a new thread - * instance will be created for each process but the previous - * instances may not be cleaned up. This results in a significant - * virtual memory loss each time the process is spawned. If there - * is a WaitForInputIdle() call between CreateProcess() and - * CloseHandle(), the problem does not occur. PSS ID Number: Q124121 - */ - - WaitForInputIdle(piProcInfo.hProcess, 5000); - return ok; } -- cgit v1.2.3