On Fri, Apr 4, 2008 at 8:35 AM, Robert Shearman <[EMAIL PROTECTED]> wrote:
> > > Alexandre Julliard wrote:
> > >
> > >
> > > > I don't think we want to disable exceptions, that will just lead to
> > > > broken builds. It should be possible to make the sigsetjmp variant
> work
>
>  The reason is that RtlUnwind clears all general purpose registers (and
> maybe changes esp/ebp) so that frame is no longer valid. There may be a way
> to work around this, but I'm not sure.
>

Well how about for the interim a no op patch.  No op exceptions can be
handled in the case:
defined(__MINGW32__) && ! defined(USE_COMPILER_EXCEPTIONS).

The eventual support for compiler exceptions can then go in separate
case: defined(__MINGW32__) && defined(USE_COMPILER_EXCEPTIONS)

Patch attached implementing Rob S suggestions.

--John
From 992f6269d1ddc0671a0ebe4fc45a3886660b548b Mon Sep 17 00:00:00 2001
From: John Klehm <[EMAIL PROTECTED]>
Date: Sat, 5 Apr 2008 12:02:02 -0500
Subject: exception.h: Add no op exception definitions for cross compiling

---
 include/wine/exception.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/wine/exception.h b/include/wine/exception.h
index fc90364..bfe3330 100644
--- a/include/wine/exception.h
+++ b/include/wine/exception.h
@@ -75,6 +75,16 @@
 #define __EXCEPT_PAGE_FAULT __except(GetExceptionCode() == 
EXCEPTION_ACCESS_VIOLATION)
 #define __EXCEPT_ALL __except(EXCEPTION_EXECUTE_HANDLER)
 
+/* elif to  ifdef USE_COMPILER_EXCEPTIONS */
+#elif defined(__MINGW32__) && !defined(USE_COMPILER_EXCEPTIONS)
+
+#define __TRY
+#define __EXCEPT(func) if (0)
+#define __FINALLY(func) 
+#define __ENDTRY
+#define __EXCEPT_PAGE_FAULT if (0)
+#define __EXCEPT_ALL if (0)
+
 #else  /* USE_COMPILER_EXCEPTIONS */
 
 #ifndef __GNUC__
-- 
1.5.4.5



Reply via email to