Commit c42dfdd0 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed Winelib compilation.

parent 9597e209
......@@ -43,9 +43,7 @@ DECLARE_DEBUG_CHANNEL(io)
(PTR_SEG_OFF_TO_LIN(SS_sig(context),STACK_sig(context)))))
/* For invalid registers fixup */
extern DWORD CallFrom16_Start,CallFrom16_End;
extern DWORD CALLTO16_Start,CALLTO16_End;
int (*INSTR_IsRelay)( const void *addr ) = NULL;
/***********************************************************************
* INSTR_ReplaceSelector
......@@ -60,11 +58,8 @@ extern DWORD CALLTO16_Start,CALLTO16_End;
*/
static BOOL INSTR_ReplaceSelector( SIGCONTEXT *context, WORD *sel )
{
if ( IS_SELECTOR_SYSTEM(CS_sig(context)) )
if ( ( EIP_sig(context) >= (DWORD)&CallFrom16_Start &&
EIP_sig(context) < (DWORD)&CallFrom16_End )
|| ( EIP_sig(context) >= (DWORD)&CALLTO16_Start &&
EIP_sig(context) < (DWORD)&CALLTO16_End ) )
if (IS_SELECTOR_SYSTEM(CS_sig(context)))
if (INSTR_IsRelay && INSTR_IsRelay( (void *)EIP_sig(context) ))
{
/* Saved selector may have become invalid when the relay code */
/* tries to restore it. We simply clear it. */
......
......@@ -23,6 +23,18 @@
static int MAIN_argc;
static char **MAIN_argv;
extern int (*INSTR_IsRelay)( const void *addr );
static int is_relay_addr( const void *addr )
{
extern char CallFrom16_Start, CallFrom16_End, CALLTO16_Start, CALLTO16_End;
return ((((char *)addr >= &CallFrom16_Start) &&
((char *)addr < &CallFrom16_End)) ||
(((char *)addr >= &CALLTO16_Start) &&
((char *)addr < &CALLTO16_End)));
}
/***********************************************************************
* Emulator initialisation
*/
......@@ -141,6 +153,7 @@ int main( int argc, char *argv[] )
MAIN_argc = argc; MAIN_argv = argv;
/* Set up debugger hook */
INSTR_IsRelay = is_relay_addr;
EXC_SetDebugEventHook( wine_debugger );
if (Options.debug)
......
......@@ -7,7 +7,7 @@
*/
#define LANGUAGE_ID Wa
#define LANGUAGE_NUMBER 0x90
#define LANGUAGE_NUMBER 90
/* System Menu */
......
......@@ -6,7 +6,7 @@
*/
#define LANGUAGE_ID Wa
#define LANGUAGE_NUMBER 0x90
#define LANGUAGE_NUMBER 90
#define LANGUAGE_MENU_ITEM "&Walon"
/* Menu */
......
......@@ -8,7 +8,7 @@
/* This file is not yet complete !! */
#define LANGUAGE_ID Wa
#define LANGUAGE_NUMBER 0x90
#define LANGUAGE_NUMBER 90
/* Menu */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment