Do not declare structures and functions specific to __mingw_init_ehandler
when not compiling __mingw_init_ehandler at all.
---
mingw-w64-crt/crt/crt_handler.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/crt/crt_handler.c b/mingw-w64-crt/crt/crt_handler.c
index e214d8768e28..56d844730fb1 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 _FindPESectionByName (const char *);
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)
{
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public