Initial revision

From-SVN: r14877
This commit is contained in:
Jason Merrill
1997-08-21 18:57:35 -04:00
parent 8975416cfb
commit 6599da043e
633 changed files with 185145 additions and 0 deletions

17
libiberty/xstrdup.c Normal file
View File

@@ -0,0 +1,17 @@
/* xstrdup.c -- Duplicate a string in memory, using xmalloc.
This trivial function is in the public domain.
Ian Lance Taylor, Cygnus Support, December 1995. */
#include "ansidecl.h"
#include "libiberty.h"
char *
xstrdup (s)
const char *s;
{
char *ret;
ret = xmalloc (strlen (s) + 1);
strcpy (ret, s);
return ret;
}