[3/9] Use "struct bcache" in objfiles.h

Message ID 20190122080445.32658-4-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey Jan. 22, 2019, 8:04 a.m. UTC
  If objfiles.h is included after bcache.h, then the "bcache" function
will cause a compiler error because "bcache" will be seen as a
function, not a type.  Fix this error by using the "struct" keyword.

gdb/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

	* objfiles.h (struct objfile_per_bfd_storage): Use "struct"
	keyword for bcache.
---
 gdb/ChangeLog  | 5 +++++
 gdb/objfiles.h | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 5f106d9835..a10781f598 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -240,11 +240,11 @@  struct objfile_per_bfd_storage
 
   /* Byte cache for file names.  */
 
-  bcache *filename_cache = NULL;
+  struct bcache *filename_cache = NULL;
 
   /* Byte cache for macros.  */
 
-  bcache *macro_cache = NULL;
+  struct bcache *macro_cache = NULL;
 
   /* The gdbarch associated with the BFD.  Note that this gdbarch is
      determined solely from BFD information, without looking at target