windows: some love for this poor system
This commit is contained in:
parent
a119b491c0
commit
cd2e04bb22
2 changed files with 14 additions and 6 deletions
|
|
@ -297,6 +297,7 @@ cmp/load.lsp: $(srcdir)/cmp/load.lsp.in
|
|||
$(CP) $(srcdir)\cmp\load.lsp.in cmp\load.lsp
|
||||
cmp/cmpdefs.lsp: $(srcdir)/cmp/cmpdefs.lsp Makefile
|
||||
c\cut "@ECL_CC@" "$(CC)" \
|
||||
"@CC_IS_CXX@" "nil" \
|
||||
"@CFLAGS@" "$(CFLAGS)" \
|
||||
"@CFLAGS_OPTIMIZE@" "$(CFLAGS_OPTIMIZE)" \
|
||||
"@ECL_CFLAGS@" "" \
|
||||
|
|
|
|||
|
|
@ -1122,11 +1122,16 @@ _ecl_w32_exception_filter(struct _EXCEPTION_POINTERS* ep)
|
|||
static cl_object
|
||||
W32_handle_in_new_thread(cl_object signal_code)
|
||||
{
|
||||
/* XXX: there is some bug present only on windows platform
|
||||
with importing the current thread. Don't know how to track
|
||||
it though. */
|
||||
#if 0
|
||||
int outside_ecl = ecl_import_current_thread(@'si::handle-signal', ECL_NIL);
|
||||
mp_process_run_function(4, @'si::handle-signal',
|
||||
@'si::handle-signal',
|
||||
signal_code, ECL_NIL);
|
||||
if (outside_ecl) ecl_release_current_thread();
|
||||
#endif /* 0 */
|
||||
}
|
||||
|
||||
BOOL WINAPI W32_console_ctrl_handler(DWORD type)
|
||||
|
|
@ -1134,17 +1139,19 @@ BOOL WINAPI W32_console_ctrl_handler(DWORD type)
|
|||
switch (type) {
|
||||
case CTRL_C_EVENT:
|
||||
case CTRL_BREAK_EVENT: {
|
||||
cl_object function = ECL_SYM_FUN(@'si::terminal-interrupt');
|
||||
if (function)
|
||||
W32_handle_in_new_thread(function);
|
||||
/* cl_object function = */
|
||||
/* ECL_SYM_FUN(@'si::terminal-interrupt'); */
|
||||
/* if (function) */
|
||||
/* W32_handle_in_new_thread(function); */
|
||||
return TRUE;
|
||||
}
|
||||
case CTRL_CLOSE_EVENT:
|
||||
case CTRL_LOGOFF_EVENT:
|
||||
case CTRL_SHUTDOWN_EVENT:
|
||||
cl_object function = ECL_SYM_FUN(@'si::quit');
|
||||
if (function)
|
||||
W32_handle_in_new_thread(function);
|
||||
/* Doing nothing is arguably the most
|
||||
reasonable. Calling (quit) causes process to exit
|
||||
and Windows has problems, because "process has
|
||||
unexpectably died.*/
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue