From d254189b38bb5b0b77a18a401c05c415ce0733c9 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 23 Jul 2002 21:38:00 +0000 Subject: 2002-07-23 Jeff Johnston * libc/include/string.h: Add mempcpy, strndup, and _strndup_r prototypes. * libc/stdlib/Makefile.am: Remove strdup.c and strdup_r.c. * libc/stdlib/Makefile.in: Regenerated. * libc/stdlib/strdup.c: Removed. * libc/stdlib/strdup_r.c: Removed. * libc/string/Makefile.am: Add strdup.c, strdup_r.c, memccpy.c, mempcpy.c, strndup.c, and strndup_r.c. * libc/string/Makefile.in: Regenerated. * libc/string/memccpy.c: New file. * libc/string/mempcpy.c: Ditto. * libc/string/strndup.c: Ditto. * libc/string/strndup_r.c: Ditto. * libc/string/strdup.c: New file moved from stdlib. * libc/string/strdup_r.c: Ditto. * libc/string/strings.tex: Add memccpy and mempcpy documentation. --- newlib/libc/string/strdup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 newlib/libc/string/strdup.c (limited to 'newlib/libc/string/strdup.c') diff --git a/newlib/libc/string/strdup.c b/newlib/libc/string/strdup.c new file mode 100644 index 000000000..dbb069264 --- /dev/null +++ b/newlib/libc/string/strdup.c @@ -0,0 +1,13 @@ +#ifndef _REENT_ONLY + +#include +#include +#include + +char * +_DEFUN (strdup, (str), _CONST char *str) +{ + return _strdup_r (_REENT, str); +} + +#endif /* !_REENT_ONLY */ -- cgit v1.2.3