aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/seh_init.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2014-05-14 17:15:06 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2014-05-14 17:15:06 +0000
commitd40aeed84da43a8839e7ee1ce135f68a2b5a7003 (patch)
treee7910fa55e636be1e49d1f24636a36cfa1b418db /gcc/ada/seh_init.c
parentd02f620dc0bb3bea393d04b8639a1f4748ad8821 (diff)
downloadgcc-d40aeed84da43a8839e7ee1ce135f68a2b5a7003.zip
gcc-d40aeed84da43a8839e7ee1ce135f68a2b5a7003.tar.gz
gcc-d40aeed84da43a8839e7ee1ce135f68a2b5a7003.tar.bz2
Fix current cygwin build problems.
2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin build problems. * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__ are defined. Move include windows.h before system.h. * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile also when __CYGWIN__ is defined. Include windef.h before winbase.h. From-SVN: r210437
Diffstat (limited to 'gcc/ada/seh_init.c')
-rw-r--r--gcc/ada/seh_init.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/seh_init.c b/gcc/ada/seh_init.c
index 0d04b50..f8a702d5 100644
--- a/gcc/ada/seh_init.c
+++ b/gcc/ada/seh_init.c
@@ -32,6 +32,12 @@
/* This unit contains support for SEH (Structured Exception Handling).
Right now the only implementation is for Win32. */
+#if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__))
+/* Include system headers, before system.h poisons malloc. */
+#include <windows.h>
+#include <excpt.h>
+#endif
+
#ifdef IN_RTS
#include "tconfig.h"
#include "tsystem.h"
@@ -64,10 +70,7 @@ extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *)
ATTRIBUTE_NORETURN;
-#if defined (_WIN32)
-
-#include <windows.h>
-#include <excpt.h>
+#if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__))
/* Prototypes. */
extern void _global_unwind2 (void *);