* include/private/gc_priv.h [__MINGW32__ && __i386__ && GC_EXTERN]
(__MINGW_EXCPT_DEFINE_PSDK): Define (before any system header include);
this macro definition is needed only when extra/gc.c is compiled.
* mark.c [__MINGW32__ && __i386__] (__MINGW_EXCPT_DEFINE_PSDK): Define
(before include gc_pmark.h).
# define _USING_POSIX4A_DRAFT10 1
#endif
+#if defined(__MINGW32__) && !defined(__MINGW_EXCPT_DEFINE_PSDK) \
+ && defined(__i386__) && defined(GC_EXTERN) /* defined in gc.c */
+ /* See the description in mark.c. */
+# define __MINGW_EXCPT_DEFINE_PSDK 1
+#endif
+
# if defined(NO_DEBUGGING) && !defined(GC_ASSERTIONS) && !defined(NDEBUG)
/* To turn off assertion checking (in atomic_ops.h). */
# define NDEBUG 1
*
*/
+#if defined(__MINGW32__) && !defined(__MINGW_EXCPT_DEFINE_PSDK) \
+ && defined(__i386__) /* cannot use macros from gcconfig.h */
+ /* Otherwise EXCEPTION_REGISTRATION type declaration from winnt.h */
+ /* might be used. That declaration has "handler" callback with NTAPI */
+ /* attribute. The proper type (with "handler" field compatible with */
+ /* GC mark_ex_handler) is declared in excpt.h. The given macro is */
+ /* defined before any system header include. */
+# define __MINGW_EXCPT_DEFINE_PSDK 1
+#endif
+
#include "private/gc_pmark.h"
#include <stdio.h>