* [Fwd: [rfa] `struct _bfd' -> `struct bfd']
@ 2003-02-27 21:26 Andrew Cagney
0 siblings, 0 replies; only message in thread
From: Andrew Cagney @ 2003-02-27 21:26 UTC (permalink / raw)
To: binutils, gdb
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
FYI,
I've committed the attached. New code should use `bfd' or `struct bfd'.
GDB will shortly see a patch to flush all its references to _bfd.
Andrew
[-- Attachment #2: [rfa] `struct _bfd' -> `struct bfd' --]
[-- Type: message/rfc822, Size: 5108 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 413 bytes --]
Hello,
The attached renames the BFD object to `struct bfd' from `struct _bfd'.
To ensure backward compatibility with existing code it also #defines
_bfd -> bfd.
Having `struct bfd' available will, I think, legitimize its use as an
opaque declaration vis:
struct bfd;
void func (struct bfd *abfd);
Also, as far as I know, symbols with a leading `_' live in the system
name space.
Ok to commit?
Andrew
[-- Attachment #2.1.2: diffs --]
[-- Type: text/plain, Size: 1671 bytes --]
2003-02-24 Andrew Cagney <cagney@redhat.com>
* bfd.c (struct bfd): Rename "struct _bfd".
* bfd-in.h: Update copyright.
(struct bfd): Rename "struct _bfd".
(_bfd): Define for backward compatibility.
* bfd-in2.h: Regenerate.
Index: bfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in.h,v
retrieving revision 1.55
diff -u -r1.55 bfd-in.h
--- bfd-in.h 8 Dec 2002 03:34:38 -0000 1.55
+++ bfd-in.h 24 Feb 2003 06:34:52 -0000
@@ -1,7 +1,8 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -68,7 +69,10 @@
#endif
/* Forward declaration. */
-typedef struct _bfd bfd;
+typedef struct bfd bfd;
+/* For backward compatibility. Keep code that was using "struct
+ _bfd" working. */
+#define _bfd bfd
/* Boolean type used in bfd. Too many systems define their own
versions of "boolean" for us to safely typedef a "boolean" of
Index: bfd.c
===================================================================
RCS file: /cvs/src/src/bfd/bfd.c,v
retrieving revision 1.46
diff -u -r1.46 bfd.c
--- bfd.c 14 Feb 2003 11:16:09 -0000 1.46
+++ bfd.c 24 Feb 2003 06:35:21 -0000
@@ -34,7 +34,7 @@
CODE_FRAGMENT
.
-.struct _bfd
+.struct bfd
.{
. {* A unique identifier of the BFD *}
. unsigned int id;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-27 21:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-27 21:26 [Fwd: [rfa] `struct _bfd' -> `struct bfd'] Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).