From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RBBMNHzGql9YDwAAWB0awg (envelope-from ) for ; Tue, 10 Nov 2020 11:57:32 -0500 Received: by simark.ca (Postfix, from userid 112) id C89121F08B; Tue, 10 Nov 2020 11:57:32 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 320701E58F for ; Tue, 10 Nov 2020 11:57:32 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7299A384B823; Tue, 10 Nov 2020 16:57:31 +0000 (GMT) Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id 571EA384B823 for ; Tue, 10 Nov 2020 16:57:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 571EA384B823 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 362485606C; Tue, 10 Nov 2020 11:57:29 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id axv38GtgSpTr; Tue, 10 Nov 2020 11:57:29 -0500 (EST) Received: from murgatroyd.Home (97-122-89-243.hlrn.qwest.net [97.122.89.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id D6BF0117F65; Tue, 10 Nov 2020 11:57:27 -0500 (EST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH] Move include block to pathstuff.h (no-tn-check) Date: Tue, 10 Nov 2020 09:57:26 -0700 Message-Id: <20201110165726.789517-1-tromey@adacore.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Tromey Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" A recent commit caused pathstuff.cc to fail to compile on mingw, like: ../../binutils-gdb/gdbsupport/pathstuff.cc:324:1: error: no previous declaration for 'std::string find_gdb_home_config_file(const char*, _stati64*)' [-Werror=missing-declarations] Some newly-added #includes were changing which "stat" was being seen by the compiler. This patch moves the includes to the header, so that the declaration and definition now agree. gdbsupport/ChangeLog 2020-11-10 Tom Tromey * pathstuff.h: Move include block here... * pathstuff.cc: ... from here. --- gdbsupport/ChangeLog | 5 +++++ gdbsupport/pathstuff.cc | 4 ---- gdbsupport/pathstuff.h | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdbsupport/pathstuff.cc b/gdbsupport/pathstuff.cc index a52e53b8671..311456720e4 100644 --- a/gdbsupport/pathstuff.cc +++ b/gdbsupport/pathstuff.cc @@ -23,10 +23,6 @@ #include "filenames.h" #include "gdb_tilde_expand.h" -#include -#include -#include - #ifdef USE_WIN32API #include #endif diff --git a/gdbsupport/pathstuff.h b/gdbsupport/pathstuff.h index 996c8f2bbf6..7e35f62c78c 100644 --- a/gdbsupport/pathstuff.h +++ b/gdbsupport/pathstuff.h @@ -22,6 +22,10 @@ #include "gdbsupport/byte-vector.h" +#include +#include +#include + /* Path utilities. */ /* Return the real path of FILENAME, expanding all the symbolic links. -- 2.26.2