From patchwork Tue Nov 26 18:44:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 36240 Received: (qmail 79232 invoked by alias); 26 Nov 2019 18:44:49 -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 79224 invoked by uid 89); 26 Nov 2019 18:44:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 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.1 spammy=HX-Languages-Length:1772 X-HELO: mail-yw1-f73.google.com Received: from mail-yw1-f73.google.com (HELO mail-yw1-f73.google.com) (209.85.161.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Nov 2019 18:44:48 +0000 Received: by mail-yw1-f73.google.com with SMTP id b184so13483821ywc.8 for ; Tue, 26 Nov 2019 10:44:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=gY8iPyw24lTyw982Tos6iGKDUThYgKmJt4tT/NsTKes=; b=EwoWAQ+qovrrdjid6/HOCtrcq75rZYHowuKztwZDFbeFYo5O2nQqaT8vcJkb5Kiz6Q 9X5fvuCHvlf7O2Ivxxe3wG1WNJulN3TDMnm7UPc28vd8wbWNWpKDQlVxtl6VyLxC/wsI J6fm2HDuKGAa2wCwDLEzIsPivBd/BLmb6sUcX3enNDDHnP1VGBGJvAsJeHwfUrj7DlqI SrHu5o4v98Su3F4L7hG0aS5BGR8U1qpSKrzRRDAdWwy9px2DvNHcpSPefd9Sy0MPGkqb eM+yOAfSbQ+JlMg5Lw3VLg5wL+wrTbfXM8dCP9KJaXvbA6pRVVFPORhqAx6JHJpoFAQ9 O3/A== Date: Tue, 26 Nov 2019 12:44:42 -0600 Message-Id: <20191126184442.246508-1-cbiesinger@google.com> Mime-Version: 1.0 Subject: [PATCH] Don't include pathmax.h from common-defs.h X-Patchwork-Original-From: "Christian Biesinger via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Christian Biesinger To: gdb-patches@sourceware.org Cc: Christian Biesinger X-IsSubscribed: yes pathmax.h is a Gnulib file, and common-defs is also used by IPA, which does not use gnulib. This is a prerequisite to cleaning up the include flags for IPA. gdb/ChangeLog: 2019-11-26 Christian Biesinger * gdbsupport/common-defs.h: Include limits.h for UINT_MAX. gdb/gdbserver/ChangeLog: 2019-11-26 Christian Biesinger * server.c: Include unistd.h instead of pathmax.h. Change-Id: Iac7e8f36b5a9107ac21b3327200d49620ce2a94f --- gdb/gdbserver/server.c | 1 + gdb/gdbsupport/common-defs.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) base-commit: 6d91ce9a659f5b65bb6ad2d30d74250da342150c diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index c5f7176cff..769c5611a5 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -25,6 +25,7 @@ #include "gdbsupport/signals-state-save-restore.h" #include #include +#include #if HAVE_SIGNAL_H #include #endif diff --git a/gdb/gdbsupport/common-defs.h b/gdb/gdbsupport/common-defs.h index 3b10468f24..4fa84ff8e5 100644 --- a/gdb/gdbsupport/common-defs.h +++ b/gdb/gdbsupport/common-defs.h @@ -97,7 +97,7 @@ #endif #include #include -/* Must be included before pathmax.h to avoid build errors about localtime_r +/* Must be included before unistd.h to avoid build errors about localtime_r and gmtime_r in gnulib on MinGW. This is a gnulib bug: https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00022.html */ #include @@ -119,7 +119,7 @@ #endif #include "libiberty.h" -#include "pathmax.h" +#include #include "gdb/signals.h" #include "gdb_locale.h" #include "ptid.h"