public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/gdb-13-branch] Fix MinGW build using mingw.org's MinGW
@ 2022-12-22 10:44 Eli Zaretskii
  0 siblings, 0 replies; only message in thread
From: Eli Zaretskii @ 2022-12-22 10:44 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d71df1e2f2e5f1762578b6ff716c56cf98336f1

commit 2d71df1e2f2e5f1762578b6ff716c56cf98336f1
Author: Eli Zaretskii <eliz@gnu.org>
Date:   Thu Dec 22 12:42:24 2022 +0200

    Fix MinGW build using mingw.org's MinGW
    
    This allows to build GDB even though the default value of
    _WIN32_WINNT is lower than the one needed to expose some
    new APIs used here, and leave the test for their actual
    support to run time.
    * gdb/nat/windows-nat.c (EXTENDED_STARTUPINFO_PRESENT): Define if
    not defined.
    (create_process_wrapper): Use 'gdb_lpproc_thread_attribute_list'
    instead of 'PPROC_THREAD_ATTRIBUTE_LIST' (which might not be defined
    at compile time).  This fixes compilation error using mingw.org's
    MinGW.

Diff:
---
 gdb/nat/windows-nat.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c
index 42031d4757c..0617cfef414 100644
--- a/gdb/nat/windows-nat.c
+++ b/gdb/nat/windows-nat.c
@@ -800,6 +800,10 @@ create_process_wrapper (FUNC *do_create_process, const CHAR *image,
 	    gdb_lpproc_thread_attribute_list lpAttributeList;
 	  };
 
+#	  ifndef EXTENDED_STARTUPINFO_PRESENT
+#	   define EXTENDED_STARTUPINFO_PRESENT 0x00080000
+#	  endif
+
 	  gdb_extended_info info_ex {};
 
 	  if (startup_info != nullptr)
@@ -810,7 +814,7 @@ create_process_wrapper (FUNC *do_create_process, const CHAR *image,
 	     call always fails, by design.  */
 	  InitializeProcThreadAttributeList (nullptr, 1, 0, &size);
 	  info_ex.lpAttributeList
-	    = (PPROC_THREAD_ATTRIBUTE_LIST) alloca (size);
+	    = (gdb_lpproc_thread_attribute_list) alloca (size);
 	  InitializeProcThreadAttributeList (info_ex.lpAttributeList,
 					     1, 0, &size);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-22 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 10:44 [binutils-gdb/gdb-13-branch] Fix MinGW build using mingw.org's MinGW Eli Zaretskii

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).