diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-08-23 22:02:32 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-08-23 22:02:32 +0000 |
commit | f2267417bd269b36f69e65d88da5bb25ad333606 (patch) | |
tree | 9830864c865f045d67afbd8db5cd84f1a8241f07 /readline/savestring.c | |
parent | bb3b939be7610e6b50dadccbc1410c225cb34b71 (diff) | |
download | gdb-f2267417bd269b36f69e65d88da5bb25ad333606.tar.gz |
import of readline-4.3
Diffstat (limited to 'readline/savestring.c')
-rw-r--r-- | readline/savestring.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/readline/savestring.c b/readline/savestring.c index 485890ea57c..c7ebeb1e552 100644 --- a/readline/savestring.c +++ b/readline/savestring.c @@ -20,14 +20,17 @@ have a copy of the license, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ -extern char *strcpy (); -extern char *xmalloc (); +#include <config.h> +#ifdef HAVE_STRING_H +# include <string.h> +#endif +#include "xmalloc.h" /* Backwards compatibility, now that savestring has been removed from all `public' readline header files. */ char * savestring (s) - char *s; + const char *s; { - return ((char *)strcpy (xmalloc (1 + (int)strlen (s)), (s))); + return ((char *)strcpy ((char *)xmalloc (1 + strlen (s)), (s))); } |