From patchwork Sat Jul 14 12:52:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Turney X-Patchwork-Id: 28394 Received: (qmail 129766 invoked by alias); 14 Jul 2018 12:52:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 129755 invoked by uid 89); 14 Jul 2018 12:52:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=create_inferior, sk:jontur, sk:jon.tur, D*org.uk X-HELO: rgout04.bt.lon5.cpcloud.co.uk Received: from rgout0407.bt.lon5.cpcloud.co.uk (HELO rgout04.bt.lon5.cpcloud.co.uk) (65.20.0.220) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Jul 2018 12:52:18 +0000 X-OWM-Source-IP: 86.184.210.66 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-SNCR-VADESECURE: CLEAN Received: from localhost.localdomain (86.184.210.66) by rgout04.bt.lon5.cpcloud.co.uk (9.0.019.26-1) (authenticated as jonturney@btinternet.com) id 5B0550EE0481B53E; Sat, 14 Jul 2018 13:52:16 +0100 From: Jon Turney To: gdb-patches@sourceware.org Cc: Jon Turney Subject: [PATCH] Fix Cygwin compilation after target_ops C++ conversion. Date: Sat, 14 Jul 2018 13:52:03 +0100 Message-Id: <20180714125203.44168-1-jon.turney@dronecode.org.uk> 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 * 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 + + * windows-nat.c (windows_nat_target::create_inferior): Update to + call close() in global namespace. + 2018-07-13 Andreas Arnez * 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);