From patchwork Sat Dec 29 04:11:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 30897 Received: (qmail 109252 invoked by alias); 29 Dec 2018 04:11:12 -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 109242 invoked by uid 89); 29 Dec 2018 04:11:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.200.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 29 Dec 2018 04:11:10 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 80873400CA8C1 for ; Fri, 28 Dec 2018 21:22:33 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id d5xtgythgYTGMd5xtgmQes; Fri, 28 Dec 2018 22:11:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=jwnCucMLgi5NabTBZoOmyjZRNNiTqdq+ldB0AmDPI3E=; b=XayClAgacKLxFm9YECVwWmOHek Va20dFBhcsl3TdQncmr0bWnUkgDThzvdtoaq2MGLDUatP75lZVnMSqp87LrciBYaGgbOfELzXdOUv 2zb3Ce/PbsLeWb8APn2IfF5Y0; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:51326 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gd5xs-002fbu-TO; Fri, 28 Dec 2018 22:11:09 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Fix the build when GNU Source Highlight is not available Date: Fri, 28 Dec 2018 21:11:04 -0700 Message-Id: <20181229041104.19544-1-tom@tromey.com> The builder pointed out that, when GNU Source Highlight is not available, get_language_name is not used. This patch makes it conditional, fixing the build problem. gdb/ChangeLog 2018-12-28 Tom Tromey * source-cache.c (get_language_name): Conditionally compile. --- gdb/ChangeLog | 4 ++++ gdb/source-cache.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gdb/source-cache.c b/gdb/source-cache.c index 56851806e4..f1715523b1 100644 --- a/gdb/source-cache.c +++ b/gdb/source-cache.c @@ -108,6 +108,8 @@ source_cache::extract_lines (const struct source_text &text, int first_line, return false; } +#ifdef HAVE_SOURCE_HIGHLIGHT + /* Return the Source Highlight language name, given a gdb language LANG. Returns NULL if the language is not known. */ @@ -160,6 +162,8 @@ get_language_name (enum language lang) return nullptr; } +#endif /* HAVE_SOURCE_HIGHLIGHT */ + /* See source-cache.h. */ bool