diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-09-05 11:40:50 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-26 11:02:29 +0200 |
commit | 09b91bbcddd4900d433ea72f08dd11719bceaa58 (patch) | |
tree | 39f617d23f635a992980479f61572330caae3fd9 /gcc | |
parent | fb95fb2125230fb594d88a7d73b524853c6604c5 (diff) | |
download | gcc-09b91bbcddd4900d433ea72f08dd11719bceaa58.zip gcc-09b91bbcddd4900d433ea72f08dd11719bceaa58.tar.gz gcc-09b91bbcddd4900d433ea72f08dd11719bceaa58.tar.bz2 |
ada: Deconstruct build support for ancient MinGW
Remove conditional C code for building GNAT with MinGW earlier than 2.0,
which was released in 2007.
gcc/ada/
* adaint.c: Remove conditional #include directives for old MinGW.
* cal.c: Always include winsock.h, since it is part of modern
MinGW.
* cstreams.c: Remove workaround for old MinGW.
* expect.c: Remove conditional #include directive for old MinGW.
* mingw32.h: Remove STD_MINGW and OLD_MINGW declarations.
* sysdep.c: Remove conditional #include directive for old MinGW.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/adaint.c | 13 | ||||
-rw-r--r-- | gcc/ada/cal.c | 2 | ||||
-rw-r--r-- | gcc/ada/cstreams.c | 8 | ||||
-rw-r--r-- | gcc/ada/expect.c | 8 | ||||
-rw-r--r-- | gcc/ada/mingw32.h | 17 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 6 |
6 files changed, 5 insertions, 49 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 2ae4ded..199dbe0 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -200,11 +200,7 @@ UINT __gnat_current_ccs_encoding; #endif /* wait.h processing */ -#ifdef __MINGW32__ -# if OLD_MINGW -# include <sys/wait.h> -# endif -#elif defined (__vxworks) && defined (__RTP__) +#if defined (__vxworks) && defined (__RTP__) # include <wait.h> #elif defined (__Lynx__) /* ??? We really need wait.h and it includes resource.h on Lynx. GCC @@ -214,7 +210,7 @@ UINT __gnat_current_ccs_encoding; preventing the inclusion of the GCC header from doing anything. */ # define GCC_RESOURCE_H # include <sys/wait.h> -#elif defined (__PikeOS__) +#elif defined (__PikeOS__) || defined (__MINGW32__) /* No wait() or waitpid() calls available. */ #else /* Default case. */ @@ -335,11 +331,6 @@ const char *__gnat_library_template = GNAT_LIBRARY_TEMPLATE; #if defined (__MINGW32__) #include "mingw32.h" - -#if OLD_MINGW -#include <sys/param.h> -#endif - #else #include <sys/param.h> #endif diff --git a/gcc/ada/cal.c b/gcc/ada/cal.c index e1ab692..09bcc15 100644 --- a/gcc/ada/cal.c +++ b/gcc/ada/cal.c @@ -53,10 +53,8 @@ #ifdef __MINGW32__ #include "mingw32.h" -#if STD_MINGW #include <winsock.h> #endif -#endif void __gnat_timeval_to_duration (struct timeval *t, long long *sec, long *usec) diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index 10cc3a6..fc583e1 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -97,14 +97,6 @@ extern "C" { #undef fileno #endif -/* The _IONBF value in MINGW32 stdio.h is wrong. */ -#if defined (WINNT) || defined (_WINNT) -#if OLD_MINGW -#undef _IONBF -#define _IONBF 0004 -#endif -#endif - int __gnat_feof (FILE *stream) { diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c index b1889fe..48fb107 100644 --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -42,17 +42,13 @@ #include "adaint.h" #include <sys/types.h> -#ifdef __MINGW32__ -# if OLD_MINGW -# include <sys/wait.h> -# endif -#elif defined (__vxworks) && defined (__RTP__) +#if defined (__vxworks) && defined (__RTP__) # include <wait.h> #elif defined (__Lynx__) /* ??? See comment in adaint.c. */ # define GCC_RESOURCE_H # include <sys/wait.h> -#elif defined (__PikeOS__) +#elif defined (__PikeOS__) || defined (__MINGW32__) /* No wait.h available */ #else #include <sys/wait.h> diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h index 1157fc6..bf8577b 100644 --- a/gcc/ada/mingw32.h +++ b/gcc/ada/mingw32.h @@ -101,23 +101,6 @@ extern UINT __gnat_current_ccs_encoding; #include <stdlib.h> -/* STD_MINGW: standard if MINGW32 version > 1.3, we have switched to this - version instead of the previous enhanced version to ease building GNAT on - Windows platforms. By using STD_MINGW or OLD_MINGW it is possible to build - GNAT using both MingW include files (Old MingW + ACT changes and standard - MingW starting with version 1.3. - For w64 Mingw the define STD_MINGW is always set to value 1, because - there is no old header set present. */ -#ifdef _WIN64 -#define STD_MINGW 1 -#else -#define STD_MINGW ((__MINGW32_MAJOR_VERSION == 1 \ - && __MINGW32_MINOR_VERSION >= 3) \ - || (__MINGW32_MAJOR_VERSION >= 2)) -#endif - -#define OLD_MINGW (!(STD_MINGW)) - #ifndef MAXPATHLEN #define MAXPATHLEN MAX_PATH #endif diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 5e9cf70..7bdfcbc 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -323,11 +323,7 @@ __gnat_ttyname (int filedes ATTRIBUTE_UNUSED) || defined (__QNX__) # ifdef __MINGW32__ -# if OLD_MINGW -# include <termios.h> -# else -# include <conio.h> /* for getch(), kbhit() */ -# endif +# include <conio.h> /* for getch(), kbhit() */ # else # include <termios.h> # endif |