diff --git a/C/sysbits.c b/C/sysbits.c index 6c5287a8e..771346909 100644 --- a/C/sysbits.c +++ b/C/sysbits.c @@ -27,6 +27,9 @@ static char SccsId[] = "%W% %G%"; * */ +#if _MSC_VER || defined(__MINGW32__) +#define _WIN32_WINNT 0x0400 +#endif #include "Yap.h" #include "yapio.h" #include "eval.h" @@ -68,8 +71,7 @@ static char SccsId[] = "%W% %G%"; #if HAVE_FCNTL_H #include #endif -#ifdef _WIN32 -#define _WIN32_WINNT 0x0400 +#if _MSC_VER || defined(__MINGW32__) #include /* required for DLL compatibility */ #if HAVE_DIRECT_H @@ -1976,8 +1978,7 @@ p_alarm(void) liDueTime.LowPart = (DWORD) ( due_time & 0xFFFFFFFF ); liDueTime.HighPart = (LONG) ( due_time >> 32 ); if (SetWaitableTimer(htimer, &liDueTime,0,HandleTimer,NULL,0) == 0) { - Error(SYSTEM_ERROR, TermNil, - "alarm not available in this configuration"); + WinError("trying to use alarm"); return(FALSE); } } diff --git a/pl/debug.yap b/pl/debug.yap index 0f06338be..ef5b6ed79 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -491,7 +491,7 @@ debugging :- CP is '$last_choice_pt', ( '$fetch_clause'(G,M,Cl,Clause), - (Clause = true -> true ; '$call'(Clause,M,CP) ) + (Clause = true -> true ; '$call'(Clause,CP,Clause,M) ) ; Next is Cl+1, '$set_value'(spy_cl,Next), fail ). @@ -512,7 +512,7 @@ debugging :- '$fetch_reference_from_index'(Index, Cl1, Ref), instance(Ref, (G :- Clause)) ), - (Clause = true -> true ; '$call'(Clause,M,CP) ) + (Clause = true -> true ; '$call'(Clause,CP,Clause,M) ) ; Next is Cl+1, '$set_value'(spy_cl,Next), fail ). @@ -531,7 +531,7 @@ debugging :- ( '$db_nb_to_ref'(Cl,M:G,Ref), instance(Ref, (G :- Clause)), - (Clause = true -> true ; '$call'(Clause,M,CP) ) + (Clause = true -> true ; '$call'(Clause,CP,Clause,M) ) ; Next is Cl+1, '$set_value'(spy_cl,Next), fail ). @@ -571,7 +571,7 @@ debugging :- ), (Clause = true -> true ; % otherwise fast skip may try to interpret assembly builtins. - '$get_value'(spy_fs,1) -> '$call'(Clause,M,CP) ; + '$get_value'(spy_fs,1) -> '$call'(Clause,CP,Clause,M) ; '$creep_call'(Clause,M,CP) ) ; @@ -587,7 +587,7 @@ debugging :- instance(Ref, (G :- Clause)), (Clause = true -> true ; % otherwise fast skip may try to interpret assembly builtins. - '$get_value'(spy_fs,1) -> '$call'(Clause,M,CP) ; + '$get_value'(spy_fs,1) -> '$call'(Clause,CP,Clause,M) ; '$creep_call'(Clause,M,CP) ) ;