[binutils-gdb] Remove EXTERN from buildsym.h

Tom Tromey tromey@sourceware.org
Fri Jul 20 15:49:00 GMT 2018


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b80a981d0867f554d382eef9fc16081b12ac0543

commit b80a981d0867f554d382eef9fc16081b12ac0543
Author: Tom Tromey <tom@tromey.com>
Date:   Mon May 21 09:21:18 2018 -0600

    Remove EXTERN from buildsym.h
    
    Nothing in buildsym.h relies on the "EXTERN" method of
    declaration/definition, so remove the traces.
    
    gdb/ChangeLog
    2018-07-20  Tom Tromey  <tom@tromey.com>
    
    	* buildsym.h (EXTERN): Don't define or undef.
    	* buildsym.c (EXTERN): Don't define.

Diff:
---
 gdb/ChangeLog  |  5 +++++
 gdb/buildsym.c |  7 +------
 gdb/buildsym.h | 13 +------------
 3 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3b8de34..f695ce2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2018-07-20  Tom Tromey  <tom@tromey.com>
 
+	* buildsym.h (EXTERN): Don't define or undef.
+	* buildsym.c (EXTERN): Don't define.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
 	* buildsym.c: Remove TODO comment.
 
 2018-07-20  Tom Tromey  <tom@tromey.com>
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index e6eb711..dffd077 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 <algorithm>
 
-/* 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 9f04314..220d7f4 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) */



More information about the Gdb-cvs mailing list