From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110519 invoked by alias); 1 Mar 2018 20:47:02 -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 110505 invoked by uid 89); 1 Mar 2018 20:47:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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; Thu, 01 Mar 2018 20:47:00 +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 w21KkrvV029502 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 1 Mar 2018 15:46:58 -0500 Received: by simark.ca (Postfix, from userid 112) id 7E9B41E5AF; Thu, 1 Mar 2018 15:46:53 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id BA1CD1E5AF; Thu, 1 Mar 2018 15:46:47 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 01 Mar 2018 20:47:00 -0000 From: Simon Marchi To: Sergio Durigan Junior Cc: GDB Patches , Simon Marchi , Pedro Alves , Joel Brobecker , Christophe Lyon Subject: Re: [PATCH] Conditionally include "" on common/pathstuff.c (and unbreak build on mingw*) In-Reply-To: <20180301202005.11563-1-sergiodj@redhat.com> References: <20180301202005.11563-1-sergiodj@redhat.com> Message-ID: <9e7094c12a2ce6410cbb55ad3fbe411e@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 1 Mar 2018 20:46:53 +0000 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00040.txt.bz2 On 2018-03-01 15:20, Sergio Durigan Junior wrote: > commit b4987c956dfa44ca9fd8552f63e15f5fa094b2a4 > Author: Sergio Durigan Junior > Date: Fri Feb 9 18:44:59 2018 -0500 > > Create new common/pathstuff.[ch] > > Introduced a regression when compiling for mingw*: > > /gdb/common/pathstuff.c: In function 'gdb::unique_xmalloc_ptr > gdb_realpath(const char*)': > /gdb/common/pathstuff.c:56:14: error: 'MAX_PATH' was not declared in > this scope > char buf[MAX_PATH]; > ^ > /gdb/common/pathstuff.c:57:5: error: 'DWORD' was not declared in this > scope > DWORD len = GetFullPathName (filename, MAX_PATH, buf, NULL); > ^ > /gdb/common/pathstuff.c:57:11: error: expected ';' before 'len' > DWORD len = GetFullPathName (filename, MAX_PATH, buf, NULL); > ^ > /gdb/common/pathstuff.c:63:9: error: 'len' was not declared in this > scope > if (len > 0 && len < MAX_PATH) > ^ > /gdb/common/pathstuff.c:64:54: error: 'buf' was not declared in this > scope > return gdb::unique_xmalloc_ptr (xstrdup (buf)); > ^ > make[2]: *** [pathstuff.o] Error 1 > > The proper fix is to conditionally include "". This commit > does that, without introducing any regressions as per tests made by > our BuildBot. > > gdb/ChangeLog: > 2018-03-01 Sergio Durigan Junior > > PR gdb/22907 > * common/pathstuff.c: Conditionally include "". > --- > gdb/common/pathstuff.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gdb/common/pathstuff.c b/gdb/common/pathstuff.c > index fc574dc32e..8c4093fc38 100644 > --- a/gdb/common/pathstuff.c > +++ b/gdb/common/pathstuff.c > @@ -23,6 +23,10 @@ > #include "filenames.h" > #include "gdb_tilde_expand.h" > > +#ifdef USE_WIN32API > +#include > +#endif > + > /* See common/pathstuff.h. */ > > gdb::unique_xmalloc_ptr Christopher, does that fix the issue for you? If so, the patch LGTM. Simon