crt: crt_handler: Move __mingw_init_ehandler specific definitions into appropriate ifdef section Do not declare structures and functions specific to __mingw_init_ehandler when not compiling __mingw_init_ehandler at all. Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/crt/crt_handler.c b/mingw-w64-crt/crt/crt_handler.c index 1d9367b..636b901 100644 --- a/mingw-w64-crt/crt/crt_handler.c +++ b/mingw-w64-crt/crt/crt_handler.c
@@ -13,6 +13,8 @@ #include <signal.h> #include <stdio.h> +#if defined(__x86_64__) && !defined(_MSC_VER) && !defined(__SEH__) + #pragma pack(push,1) typedef struct _UNWIND_INFO { BYTE VersionAndFlags; @@ -27,16 +29,13 @@ PIMAGE_SECTION_HEADER _FindPESectionExec (size_t); PBYTE _GetPEImageBase (void); -int __mingw_init_ehandler (void); -extern void _fpreset (void); - -#if defined(__x86_64__) && !defined(_MSC_VER) && !defined(__SEH__) EXCEPTION_DISPOSITION __cdecl __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); #define MAX_PDATA_ENTRIES 32 static RUNTIME_FUNCTION emu_pdata[MAX_PDATA_ENTRIES]; static UNWIND_INFO emu_xdata[MAX_PDATA_ENTRIES]; +int __mingw_init_ehandler (void); int __mingw_init_ehandler (void) {