From d40aeed84da43a8839e7ee1ce135f68a2b5a7003 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Wed, 14 May 2014 17:15:06 +0000 Subject: Fix current cygwin build problems. 2014-05-14 Bernd Edlinger 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 | 8 ++++++++ gcc/ada/s-oscons-tmplt.c | 5 +++-- gcc/ada/seh_init.c | 11 +++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) (limited to 'gcc') 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 + + 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 * 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 #endif -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(__CYGWIN__) +# include # include #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 +#include +#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 -#include +#if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__)) /* Prototypes. */ extern void _global_unwind2 (void *); -- cgit v1.1