public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] ada: Follow-up fix for compilation issue with recent MinGW-w64 versions
@ 2023-07-10 12:44 Marc Poulhiès
  2023-07-11  9:20 ` Eric Botcazou
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Poulhiès @ 2023-07-10 12:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

It turns out that adaint.c includes other Windows header files than just
windows.h, so defining WIN32_LEAN_AND_MEAN is not sufficient for it.

gcc/ada/

	* adaint.c [_WIN32]: Undefine 'abort' macro.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/adaint.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 8522094164e..2a193efc002 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -227,6 +227,9 @@ UINT __gnat_current_ccs_encoding;
 
 #elif defined (_WIN32)
 
+/* Cannot redefine abort here.  */
+#undef abort
+
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <accctrl.h>
-- 
2.40.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [COMMITTED] ada: Follow-up fix for compilation issue with recent MinGW-w64 versions
  2023-07-10 12:44 [COMMITTED] ada: Follow-up fix for compilation issue with recent MinGW-w64 versions Marc Poulhiès
@ 2023-07-11  9:20 ` Eric Botcazou
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2023-07-11  9:20 UTC (permalink / raw)
  To: Marc Poulhiès; +Cc: gcc-patches

> It turns out that adaint.c includes other Windows header files than just
> windows.h, so defining WIN32_LEAN_AND_MEAN is not sufficient for it.
> 
> gcc/ada/
> 
> 	* adaint.c [_WIN32]: Undefine 'abort' macro.

I backported it onto the 13 branch.

-- 
Eric Botcazou



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-11  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 12:44 [COMMITTED] ada: Follow-up fix for compilation issue with recent MinGW-w64 versions Marc Poulhiès
2023-07-11  9:20 ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).