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.
This commit is contained in:
parent
fb95fb2125
commit
09b91bbcdd
6 changed files with 5 additions and 49 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue