diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2006-06-08 13:10:52 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2006-06-08 13:10:52 +0000 |
commit | 8911861820133a176d34353d257262dd1e764b1d (patch) | |
tree | 4f7e9c4875f6299d738033dee893ab739d16c3dc /contrib/binutils/libiberty/xstrdup.c | |
parent | 2ce641c5c4a4abcf1b9d570b63ec974620adb2d3 (diff) |
Diffstat (limited to 'contrib/binutils/libiberty/xstrdup.c')
-rw-r--r-- | contrib/binutils/libiberty/xstrdup.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/contrib/binutils/libiberty/xstrdup.c b/contrib/binutils/libiberty/xstrdup.c deleted file mode 100644 index 5aa084a76879..000000000000 --- a/contrib/binutils/libiberty/xstrdup.c +++ /dev/null @@ -1,34 +0,0 @@ -/* xstrdup.c -- Duplicate a string in memory, using xmalloc. - This trivial function is in the public domain. - Ian Lance Taylor, Cygnus Support, December 1995. */ - -/* - -@deftypefn Replacement char* xstrdup (const char *@var{s}) - -Duplicates a character string without fail, using @code{xmalloc} to -obtain memory. - -@end deftypefn - -*/ - -#include <sys/types.h> -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#ifdef HAVE_STRING_H -#include <string.h> -#endif -#include "ansidecl.h" -#include "libiberty.h" - -char * -xstrdup (s) - const char *s; -{ - register size_t len = strlen (s) + 1; - register char *ret = xmalloc (len); - memcpy (ret, s, len); - return ret; -} |