From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5517 invoked by alias); 12 Mar 2019 16:29:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5342 invoked by uid 89); 12 Mar 2019 16:29:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=proper X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Mar 2019 16:29:56 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x2CGTnns014496 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 12 Mar 2019 12:29:54 -0400 Received: by simark.ca (Postfix, from userid 112) id 7A8191E660; Tue, 12 Mar 2019 12:29:49 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 6C48F1E4A5; Tue, 12 Mar 2019 12:29:48 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 Mar 2019 16:29:00 -0000 From: Simon Marchi To: Eli Zaretskii Cc: gdb-patches@sourceware.org, palves@redhat.com Subject: Re: MinGW build failure for GDB 8.2.90 with source-highlight In-Reply-To: <83ef7c3xft.fsf@gnu.org> References: <83r2bibvlv.fsf@gnu.org> <83ef7d5wak.fsf@gnu.org> <83ef7c3xft.fsf@gnu.org> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00238.txt.bz2 On 2019-03-12 11:49, Eli Zaretskii wrote: >> X-Spam-Status: No, score=-1.5 required=5.0 >> tests=BAYES_50,RCVD_IN_DNSWL_MED, >> URIBL_BLOCKED autolearn=disabled version=3.3.2 >> Date: Mon, 11 Mar 2019 22:31:17 -0400 >> From: Simon Marchi >> Cc: gdb-patches@sourceware.org, Pedro Alves >> >> >> Perhaps we should simply #undef these two symbols before including >> >> ? >> > >> > TIA >> >> If the change is localized in one or a handful of files, I think it >> would be acceptable for the 8.3 release, since the alternative >> solution >> would be (1) a lot of work and (2) risky. >> >> Can you post a patch that fixes the build for you? > > Sure, here it is: > > diff --git a/gdb/source-cache.c b/gdb/source-cache.c > index 097c8a3..b98272c 100644 > --- a/gdb/source-cache.c > +++ b/gdb/source-cache.c > @@ -23,6 +23,8 @@ > #include "cli/cli-style.h" > > #ifdef HAVE_SOURCE_HIGHLIGHT > +#undef open > +#undef close > #include > #include > #include Thanks, this is fine with me, maybe with a comment explaining why it's needed. I also think you could push it to the master branch, so that it builds for mingw users. We will try to get the proper solution merged in the next release cycle, at which point we can remove this "hack". Simon