public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix Cygwin compilation after target_ops C++ conversion.
@ 2018-07-14 12:52 Jon Turney
  2018-07-25 20:09 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Turney @ 2018-07-14 12:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Jon Turney

After f6ac5f3d "Convert struct target_ops to C++", we need to explicitly use
the global namespace when calling ::close() from windows_nat_target methods,
as that object has a close() method.

gdb/ChangeLog:

2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>

	* windows-nat.c (windows_nat_target::create_inferior): Update to
	call close() in global namespace.
---
 gdb/ChangeLog     | 5 +++++
 gdb/windows-nat.c | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7b808eb3a7..74d4fcfdbe 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (windows_nat_target::create_inferior): Update to
+	call close() in global namespace.
+
 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
 	* s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index b5c00d7793..070aabe0de 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2701,13 +2701,13 @@ windows_nat_target::create_inferior (const char *exec_file,
 
   if (tty >= 0)
     {
-      close (tty);
+      ::close (tty);
       dup2 (ostdin, 0);
       dup2 (ostdout, 1);
       dup2 (ostderr, 2);
-      close (ostdin);
-      close (ostdout);
-      close (ostderr);
+      ::close (ostdin);
+      ::close (ostdout);
+      ::close (ostderr);
     }
 #else  /* !__CYGWIN__ */
   allargs_len = strlen (allargs);
-- 
2.17.0

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

* Re: [PATCH] Fix Cygwin compilation after target_ops C++ conversion.
  2018-07-14 12:52 [PATCH] Fix Cygwin compilation after target_ops C++ conversion Jon Turney
@ 2018-07-25 20:09 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2018-07-25 20:09 UTC (permalink / raw)
  To: Jon Turney; +Cc: gdb-patches

>>>>> "Jon" == Jon Turney <jon.turney@dronecode.org.uk> writes:

Jon> After f6ac5f3d "Convert struct target_ops to C++", we need to explicitly use
Jon> the global namespace when calling ::close() from windows_nat_target methods,
Jon> as that object has a close() method.

I didn't see a reply to this.

Jon> 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>

Jon> 	* windows-nat.c (windows_nat_target::create_inferior): Update to
Jon> 	call close() in global namespace.

This is ok.  Thank you.

Tom

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

end of thread, other threads:[~2018-07-25 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-14 12:52 [PATCH] Fix Cygwin compilation after target_ops C++ conversion Jon Turney
2018-07-25 20:09 ` Tom Tromey

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