From: Jon Turney <jon.turney@dronecode.org.uk>
To: gdb-patches@sourceware.org
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH] Fix Cygwin compilation after target_ops C++ conversion.
Date: Sat, 14 Jul 2018 12:52:00 -0000 [thread overview]
Message-ID: <20180714125203.44168-1-jon.turney@dronecode.org.uk> (raw)
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
next reply other threads:[~2018-07-14 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-14 12:52 Jon Turney [this message]
2018-07-25 20:09 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180714125203.44168-1-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).