diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2014-05-14 17:15:06 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2014-05-14 17:15:06 +0000 |
commit | d40aeed84da43a8839e7ee1ce135f68a2b5a7003 (patch) | |
tree | e7910fa55e636be1e49d1f24636a36cfa1b418db /gcc | |
parent | d02f620dc0bb3bea393d04b8639a1f4748ad8821 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 5 | ||||
-rw-r--r-- | gcc/ada/seh_init.c | 11 |
3 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e84ca90..6bdff31 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 5a034d5..9b5edb2 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -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 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 *); |