Fix current cygwin build problems.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 14 May 2014 17:15:06 +0000 (17:15 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Wed, 14 May 2014 17:15:06 +0000 (17:15 +0000)
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

gcc/ada/ChangeLog
gcc/ada/s-oscons-tmplt.c
gcc/ada/seh_init.c

index e84ca9098093521ee1cdb606dff4ff59980972e7..6bdff31e08cf6b73c69553439d0087a3b195210b 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity): Convert
index 5a034d584576090bbc2a189827899b54c2de1872..9b5edb2a5927ade704eb11d96633239684ba9110 100644 (file)
@@ -159,7 +159,8 @@ pragma Style_Checks ("M32766");
 # include <signal.h>
 #endif
 
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__CYGWIN__)
+# include <windef.h>
 # include <winbase.h>
 #endif
 
@@ -986,7 +987,7 @@ CND(VEOL2, "Alternative EOL")
 
 #endif /* HAVE_TERMIOS */
 
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__CYGWIN__)
 CNU(DTR_CONTROL_ENABLE, "Enable DTR flow ctrl")
 CNU(RTS_CONTROL_ENABLE, "Enable RTS flow ctrl")
 #endif
index 0d04b507578fed98e625067da02aa11d707a82e1..f8a702d5b2744957f68255ddb21146ede59bd8eb 100644 (file)
 /*  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 *);