From c43b5c8f11885b0fdb43a3bca2a11f4b1d30bc48 Mon Sep 17 00:00:00 2001 From: Warren Baird Date: Thu, 16 May 2002 23:08:01 +0000 Subject: [PATCH] Some fixes for compiling on Sparc. --- dlls/msvcrt/except.c | 3 +-- dlls/msvcrt/math.c | 21 +++++++++++++++++++-- relay32/snoop.c | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index c26054d3583..e3933411836 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -65,12 +65,12 @@ typedef struct _MSVCRT_EXCEPTION_FRAME #define TRYLEVEL_END 0xffffffff /* End of trylevel list */ #if defined(__GNUC__) && defined(__i386__) - inline static void call_finally_block( void *code_block, void *base_ptr ) { __asm__ __volatile__ ("movl %1,%%ebp; call *%%eax" \ : : "a" (code_block), "g" (base_ptr)); } +#endif static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec, struct __EXCEPTION_FRAME* frame, @@ -82,7 +82,6 @@ static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec, *dispatch = frame; return ExceptionCollidedUnwind; } -#endif /********************************************************************* diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 066abdd5fe9..68c1bd0f4eb 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -572,7 +572,12 @@ unsigned int _control87(unsigned int newval, unsigned int mask) */ unsigned int _controlfp(unsigned int newval, unsigned int mask) { +#ifdef __i386__ return _control87( newval, mask & ~_EM_DENORMAL ); +#else + FIXME(":Not Implemented!\n"); + return 0; +#endif } /********************************************************************* @@ -699,7 +704,13 @@ LONGLONG MSVCRT_div(int num, int denom) */ MSVCRT_div_t MSVCRT_div(int num, int denom) { - return div(num,denom); + div_t dt = div(num,denom); + MSVCRT_div_t ret; + ret.quot = dt.quot; + ret.rem = dt.rem; + + return ret; + } #endif /* ifdef __i386__ */ @@ -725,7 +736,13 @@ ULONGLONG MSVCRT_ldiv(long num, long denom) */ MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom) { - return ldiv(num,denom); + ldiv_t result = ldiv(num,denom); + + MSVCRT_ldiv_t ret; + ret.quot = result.quot; + ret.rem = result.rem; + + return ret; } #endif /* ifdef __i386__ */ diff --git a/relay32/snoop.c b/relay32/snoop.c index d9215b6c81d..8d5013bcf93 100644 --- a/relay32/snoop.c +++ b/relay32/snoop.c @@ -410,7 +410,7 @@ __ASM_GLOBAL_FUNC( SNOOP_Return, ".long " __ASM_NAME("SNOOP_DoReturn") ",0" ); #else /* !__i386__ */ -void SNOOP_RegisterDLL(HMODULE hmod,LPCSTR name,DWORD nrofordinals) { +void SNOOP_RegisterDLL(HMODULE hmod,LPCSTR name,DWORD nrofordinals, DWORD dw) { if (!TRACE_ON(snoop)) return; FIXME("snooping works only on i386 for now.\n"); }