_setjmp calls in user32 cause a failure in linking on Mingw

Steven Edwards steven_ed4153 at yahoo.com
Wed Jul 23 00:01:34 CDT 2003


Here is the problem:
../../windows/cursoricon.o(.text+0x3909): In function `LoadImageA':
e:/source/winehq/wine/dlls/user/../../windows/cursoricon.c:2005: undefined refer
ence to `_setjmp'
lstr.o(.text+0x659): In function `CharLowerA':
e:/source/winehq/wine/dlls/user/lstr.c:375: undefined reference to `_setjmp'
lstr.o(.text+0x709): In function `CharUpperA':
e:/source/winehq/wine/dlls/user/lstr.c:402: undefined reference to `_setjmp'
C:\mingw\bin\dllwrap.exe: C:\mingw\bin\gcc exited with status 1
make: *** [user32.dll] Error 1

We need to do something about the exception handling on the Mingw build for this and rcprt4. I
assume the same problem will exist on cygwin. Can we set a conditional link for msvcrt/cygwin like
we do for libwine? Capser has sent me this patch for exception handling but I dont really
understand all of this so any suggestions?

Thanks
Steven


Index: include/wine/exception.h
===================================================================
RCS file: /home/wine/wine/include/wine/exception.h,v
retrieving revision 1.22
diff -u -p -u -r1.22 exception.h
--- include/wine/exception.h	4 Jan 2003 00:19:17 -0000	1.22
+++ include/wine/exception.h	9 Jul 2003 19:14:16 -0000
@@ -74,6 +74,15 @@
 
 #else  /* USE_COMPILER_EXCEPTIONS */
 
+#if defined(WIN32)
+
+#define __TRY do { do
+#define __EXCEPT(func) while(0); } while(0);
+#define __FINALLY(func) while(0); } while(0);
+#define __ENDTRY
+
+#else /* !WIN32 */
+
 #define __TRY \
     do { __WINE_FRAME __f; \
          int __first = 1; \
@@ -114,6 +123,7 @@
          } \
     } while (0);
 
+#endif /* !WIN32 */
 
 typedef DWORD (CALLBACK *__WINE_FILTER)(PEXCEPTION_POINTERS);
 typedef void (CALLBACK *__WINE_FINALLY)(BOOL);
@@ -121,9 +131,19 @@ typedef void (CALLBACK *__WINE_FINALLY)(
 #define WINE_EXCEPTION_FILTER(func) DWORD WINAPI func( EXCEPTION_POINTERS *__eptr )
 #define WINE_FINALLY_FUNC(func) void WINAPI func( BOOL __normal )
 
+#if defined(WIN32)
+
+#define GetExceptionInformation() (NULL)
+#define GetExceptionCode()        (0)
+#define AbnormalTermination()
+
+#else /* !WIN32 */
+
 #define GetExceptionInformation() (__eptr)
 #define GetExceptionCode()        (__eptr->ExceptionRecord->ExceptionCode)
 #define AbnormalTermination()     (!__normal)
+
+#endif /* !WIN32 */
 
 typedef struct __tagWINE_FRAME
 {


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the wine-devel mailing list