Crossbuild patch, appropriate for wine?

John Klehm xixsimplicityxix at gmail.com
Fri Apr 4 04:56:25 CDT 2008


Hey the following patch eases cross compiling of the dlls that use
exceptions, its possible to work around this with scripts of course
but this makes it much cleaner to do so.  I wasnt sure if it was
appropriate to include such a modification in wine though.

This is based on what mingw does in its windef.h but I thought that
excpt.h was more appropriate.  See here for reference:
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/windef.h?rev=1.22&content-type=text/x-cvsweb-markup&cvsroot=src

With this patch the dlls that dont cross compile with wines headers are:
dbghelp
dnsapi
gdi32
glu32
icmp
iphlpapi
kernel32
msvcrt
ntdll
opengl32
rpcrt4
secur32
shell32
winex11.drv
wininet
winmm
ws2_32

Regards,

John Klehm


---
 include/excpt.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/excpt.h b/include/excpt.h
index 3369f3b..081fb06 100644
--- a/include/excpt.h
+++ b/include/excpt.h
@@ -46,6 +46,10 @@ typedef enum _EXCEPTION_DISPOSITION
 unsigned long __cdecl _exception_code(void);
 void * __cdecl _exception_info(void);
 int __cdecl _abnormal_termination(void);
+#elif defined(__GNUC__) && defined(USE_COMPILER_EXCEPTIONS)
+#define __try
+#define __except(x) while(0)
+#define __finally
 #endif /* defined(_MSC_VER) && defined(USE_COMPILER_EXCEPTIONS) */

 #endif /* __WINE_EXCPT_H */
--
1.5.4.5



More information about the wine-devel mailing list