]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: Add missing #include for MinGW
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 8 Dec 2025 21:34:20 +0000 (22:34 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 8 Dec 2025 21:37:21 +0000 (22:37 +0100)
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>.

gcc/ada/rtfinal.c
gcc/ada/rtinit.c

index 88bbb0e3e500421c31c0f2772cb2db178f60cda4..0bd3ce4ace65879c719de3e1302f1794a681813d 100644 (file)
@@ -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;
index 598550c4051ca386566db8175cc5c9ed52ee0435..3b5af0dfb01ae49e084fbd265f732d847ed6f1b2 100644 (file)
@@ -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);