+2008-04-08 Kai Tietz <kai.tietz@onevision.com>
+
+ * config/i386/mingw32.h (ENABLE_EXECUTE_STACK): New.
+ (MINGW_ENABLE_EXECUTE_STACK): New.
+ (IN_LIBGCC2): For libgcc include windows.h file for
+ function declarations.
+
2008-04-08 Hans-Peter Nilsson <hp@axis.com>
* config/cris/cris.c (cris_address_cost): For a PLUS, swap tem1
#undef TARGET_USE_JCR_SECTION
#define TARGET_USE_JCR_SECTION 1
+#undef MINGW_ENABLE_EXECUTE_STACK
+#define MINGW_ENABLE_EXECUTE_STACK \
+extern void __enable_execute_stack (void *); \
+void \
+__enable_execute_stack (void *addr) \
+{ \
+ MEMORY_BASIC_INFORMATION b; \
+ if (!VirtualQuery (addr, &b, sizeof(b))) \
+ abort (); \
+ VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, \
+ &b.Protect); \
+}
+
+#undef ENABLE_EXECUTE_STACK
+#define ENABLE_EXECUTE_STACK MINGW_ENABLE_EXECUTE_STACK
+
+
+#ifdef IN_LIBGCC2
+#include <windows.h>
+#endif
+
#if !TARGET_64BIT
#define MD_UNWIND_SUPPORT "config/i386/w32-unwind.h"
#endif