From patchwork Wed May 23 04:58:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27452 Received: (qmail 101024 invoked by alias); 23 May 2018 06:16:22 -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 100230 invoked by uid 89); 23 May 2018 06:15:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, 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=gdb_obstack.h, originated, UD:gdb_obstack.h, gdb_obstackh X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.50.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 May 2018 06:15:25 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 86FB237CF for ; Wed, 23 May 2018 01:15:09 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id LN3FfGw6ybXuJLN3FfYahk; Wed, 23 May 2018 01:15:09 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:56108 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fLLrh-003S5D-5L; Tue, 22 May 2018 23:59:09 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 32/42] Remove EXTERN from buildsym.h Date: Tue, 22 May 2018 22:58:41 -0600 Message-Id: <20180523045851.11660-33-tom@tromey.com> In-Reply-To: <20180523045851.11660-1-tom@tromey.com> References: <20180523045851.11660-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fLLrh-003S5D-5L X-Source-Sender: 174-29-44-154.hlrn.qwest.net (bapiya.Home) [174.29.44.154]:56108 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Nothing in buildsym.h relies on the "EXTERN" method of declaration/definition, so remove the traces. gdb/ChangeLog 2018-05-22 Tom Tromey * buildsym.h (EXTERN): Don't define or undef. * buildsym.c (EXTERN): Don't define. --- gdb/ChangeLog | 5 +++++ gdb/buildsym.c | 7 +------ gdb/buildsym.h | 13 +------------ 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/gdb/buildsym.c b/gdb/buildsym.c index a39c003e7c..1c7b3de215 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -62,6 +62,7 @@ */ #include "defs.h" +#include "buildsym.h" #include "bfd.h" #include "gdb_obstack.h" #include "symtab.h" @@ -79,12 +80,6 @@ #include "addrmap.h" #include -/* Ask buildsym.h to define the vars it normally declares `extern'. */ -#define EXTERN -/**/ -#include "buildsym.h" /* Our own declarations. */ -#undef EXTERN - /* For cleanup_undefined_stabs_types and finish_global_stabs (somewhat questionable--see comment where we call them). */ diff --git a/gdb/buildsym.h b/gdb/buildsym.h index b6d16876d6..8a4f47b375 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -30,22 +30,13 @@ enum language; file-reading routines. They originated in dbxread.c of gdb-4.2, and were split out to - make xcoffread.c more maintainable by sharing code. - - Variables declared in this file can be defined by #define-ing the - name EXTERN to null. It is used to declare variables that are - normally extern, but which get defined in a single module using - this technique. */ + make xcoffread.c more maintainable by sharing code. */ struct block; struct pending_block; struct dynamic_prop; -#ifndef EXTERN -#define EXTERN extern -#endif - /* The list of sub-source-files within the current individual compilation. Each file gets its own symtab with its own linetable and associated info, but they all share one blockvector. */ @@ -271,6 +262,4 @@ extern struct pending **get_file_symbols (); extern struct pending **get_global_symbols (); -#undef EXTERN - #endif /* defined (BUILDSYM_H) */