[gcc r16-5972] Ada: Add missing #include for MinGW
Eric Botcazou
ebotcazou@gcc.gnu.org
Mon Dec 8 21:37:48 GMT 2025
https://gcc.gnu.org/g:9d5395a98f16fd47fba727557f1810b28e76d0c1
commit r16-5972-g9d5395a98f16fd47fba727557f1810b28e76d0c1
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Mon Dec 8 22:34:20 2025 +0100
Ada: Add missing #include for MinGW
This adds a missing #include for <stdlib.h> and removes redundant ones.
gcc/ada/
PR ada/123037
* rtinit.c [__MINGW32__]: Include <stdlib.h> and not <windows.h>.
* rtfinal.c [__MINGW32__]: Do not include <windows.h>.
Diff:
---
gcc/ada/rtfinal.c | 2 --
gcc/ada/rtinit.c | 3 +--
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/ada/rtfinal.c b/gcc/ada/rtfinal.c
index 88bbb0e3e500..0bd3ce4ace65 100644
--- a/gcc/ada/rtfinal.c
+++ b/gcc/ada/rtfinal.c
@@ -46,9 +46,7 @@ extern int __gnat_rt_init_count;
/* see initialize.c */
#if defined (__MINGW32__)
-#define WIN32_LEAN_AND_MEAN
#include "mingw32.h"
-#include <windows.h>
extern CRITICAL_SECTION ProcListCS;
extern HANDLE ProcListEvt;
diff --git a/gcc/ada/rtinit.c b/gcc/ada/rtinit.c
index 598550c4051c..3b5af0dfb01a 100644
--- a/gcc/ada/rtinit.c
+++ b/gcc/ada/rtinit.c
@@ -70,9 +70,8 @@ int __gnat_rt_init_count = 0;
and finalize properly the run-time. */
#if defined (__MINGW32__)
-#define WIN32_LEAN_AND_MEAN
+#include <stdlib.h>
#include "mingw32.h"
-#include <windows.h>
extern void __gnat_init_float (void);
More information about the Gcc-cvs
mailing list