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 Gaylard wrote:

> From what I can see, readline used to use this, but doesn't any more.
> But its headers keep it around, presumably for backward-compatibility:
> 
> from readline.h:
> #if !defined (savestring)
> extern char *savestring __P((char *)); /* XXX backwards compatibility */
> #endif
> 
> and from histlib.h:
> #ifndef savestring
> #  ifndef strcpy
> extern char *strcpy ();
> #  endif
> #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
> #endif
> 
> and from rldefs.h:
> #ifndef savestring
> extern char *xmalloc ();
> #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
> #endif
> 
> This definition clashes with the one in gdb/defs.h:
> extern char *savestring (const char *, int);

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.

Michael

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