From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104336 invoked by alias); 2 Mar 2018 11:46:46 -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 101875 invoked by uid 89); 2 Mar 2018 11:46:46 -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,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-vk0-f42.google.com Received: from mail-vk0-f42.google.com (HELO mail-vk0-f42.google.com) (209.85.213.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Mar 2018 11:46:44 +0000 Received: by mail-vk0-f42.google.com with SMTP id b65so5572759vka.2 for ; Fri, 02 Mar 2018 03:46:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Bgunt6mGJai4jfujAom664Nda/uLOJTEKcYL9pDyEQE=; b=tZw44gAtsV9tQ1reYovWxgHM0XLfEUlH4M05G1K6U/86WVbNgiaCe6iFkeltsaCz3m uNLaB+i46xqTpZXK8AmLNQQ0sIrdD8A7sHmldVr9DWtyZBR9HGrUSVlzWs+5mfJ+kT8A hZOiDXONR39exkXqOUgrzzaitC5rGnUQz18cVxiUGZc5eqMjrggUhgil9JHLTiCyKQ5J RtTp4kAOqN0ukSFNHTCP2aWWsHuNul+Y4t4i0q2SSc3ALHVWgcStGHp4JCAVVcfeTBzh v/QE9xoosEU/bItHEWnNon/qXHBomvTM/jXxSQtGJWtAU0NQDBQy8kBy5yZr5ahS1wnb cqnA== X-Gm-Message-State: APf1xPBv6g66Of6ls9SHlPIzcQxSyOtBCtF0LZQftSBzaoIbKujmi/jA 9+5BSDVGHsD9zKVTvdiggfYY4iCFKEJL+DOdZZVuuQ== X-Google-Smtp-Source: AG47ELvy9U6Dm5mbqyq8XUMFX66zf3M/vulg2zMiEl4vtgea7nPQ4ufx/Mn9OPo1iTayTU9tthEsI2NB1CBDZQnWSAM= X-Received: by 10.31.74.67 with SMTP id x64mr3502498vka.44.1519991202420; Fri, 02 Mar 2018 03:46:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.70.28 with HTTP; Fri, 2 Mar 2018 03:46:41 -0800 (PST) In-Reply-To: <9e7094c12a2ce6410cbb55ad3fbe411e@polymtl.ca> References: <20180301202005.11563-1-sergiodj@redhat.com> <9e7094c12a2ce6410cbb55ad3fbe411e@polymtl.ca> From: Christophe Lyon Date: Fri, 02 Mar 2018 11:46:00 -0000 Message-ID: Subject: Re: [PATCH] Conditionally include "" on common/pathstuff.c (and unbreak build on mingw*) To: Simon Marchi Cc: Sergio Durigan Junior , GDB Patches , Simon Marchi , Pedro Alves , Joel Brobecker Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00051.txt.bz2 On 1 March 2018 at 21:46, Simon Marchi wrote: > 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. > Yes, I applied it to my gdb-8.1-branch , and the build now succeeds. Thanks > Simon