This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to build gdb-5.0 with readline-4.1


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]