aboutsummaryrefslogtreecommitdiff
path: root/readline/savestring.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-08-23 22:02:32 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-08-23 22:02:32 +0000
commit84041b4c47edb0461f3b82afb77ca2d81819ebfa (patch)
treeddbca1e6f70f9c4a4b6c3c923b16603a95946b22 /readline/savestring.c
parentf9267e152c9c4e2b150366c590674180e66d45df (diff)
downloadgdb-84041b4c47edb0461f3b82afb77ca2d81819ebfa.zip
gdb-84041b4c47edb0461f3b82afb77ca2d81819ebfa.tar.gz
gdb-84041b4c47edb0461f3b82afb77ca2d81819ebfa.tar.bz2
import of readline-4.3
Diffstat (limited to 'readline/savestring.c')
-rw-r--r--readline/savestring.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/readline/savestring.c b/readline/savestring.c
index 485890e..c7ebeb1 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)));
}