This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch to build gdb-5.0 with readline-4.1
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Patch to build gdb-5.0 with readline-4.1
- From: Elena Zannoni <ezannoni at cygnus dot com>
- Date: Wed, 5 Jul 2000 18:20:05 -0400 (EDT)
- Cc: msnyder at cygnus dot com, Andrew Gaylard <andrew dot gaylard at za dot didata dot com>, Eli Zaretskii <eliz at is dot elta dot co dot il>, andrew dot gaylard at bsw dot co dot za, gdb-patches at sourceware dot cygnus dot com, "Mark E." <snowball3 at bigfoot dot com>
- References: <39316D76.EAB1DAD8@bsw.co.za><200005290738.DAA06104@indy.delorie.com><3932236B.60A9BF69@za.didata.com><395B86CE.3499@cygnus.com><3932FA80.C24DB9F6@cygnus.com>
Andrew Cagney writes:
> Michael Snyder wrote:
>
> > Well, we went thru the same struggle the last time we merged
> > with readline. Maybe it would save trouble if we just renamed
> > our version of savestring (which I believe is unrelated to the
> > readline version) to gdb_savestring. Then we could forget
> > about it, and future readline merges might be less troublesome.
>
> Well, part of my todo list is to get savestring() replaced by something
> in libiberty. (like liberty:xstrdup() is slowly replaceing strsave()).
> There is (a slightly irksum) xmemdup() available, perhaphs there could
> be xstrldup() (and so I start a flame war about string duplicate
> function interfaces :-).
>
Do we have a preference on this? I would like to follow Michael's
suggestion.
> However, if the new readline really doesn't use savestring() a more
> direct solution would be to just remove #define savestring() from the
> readline header - assuming it can get be pushed back into readline 4.1.
>
I don't understand this claim. Readline uses savestring. Nothing
has changed between rl 4.0 and 4.1 (pretty much) w.r.t. savestring.
Except for the following change, which is the one that causes the
conflicts:
In readline.h:
#if !defined (savestring)
-extern char *savestring (); /* XXX backwards compatibility */
+extern char *savestring __P((char *)); /* XXX backwards compatibility */
#endif
So another alternative could be to remove the parameter from the
above, i.e. put it back to what it was. But I still prefer Michael's
suggestion, while waiting for Andrew to switch over to a libiberty
equivalent.
> Andrew
Elena