Crossbuild patch, appropriate for wine?
Robert Shearman
rob at codeweavers.com
Fri Apr 4 06:47:17 CDT 2008
John Klehm wrote:
> 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 */
>
Actually, I think the best place to fix this is in
include/wine/exception.h. I also think it would be better to use
"defined(__MINGW32__) && !defined(USE_COMPILER_EXCEPTIONS)." This is
because that is the platform that can't use the exception macros
implemented on top of sigsetjmp, and if the developer defines
"USE_COMPILER_EXCEPTIONS" then it is telling us that their compiler
supports __try, __except and __finally (there have been custom builds of
MinGW that include support for native exception handling).
--
Rob Shearman
More information about the wine-devel
mailing list