Some fixes for compiling on Sparc.
diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index c26054d..e393341 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -65,12 +65,12 @@
#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 @@
*dispatch = frame;
return ExceptionCollidedUnwind;
}
-#endif
/*********************************************************************
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 066abdd..68c1bd0 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -572,7 +572,12 @@
*/
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 @@
*/
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 @@
*/
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 d9215b6..8d5013b 100644
--- a/relay32/snoop.c
+++ b/relay32/snoop.c
@@ -410,7 +410,7 @@
".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");
}