diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-07-23 21:38:00 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-07-23 21:38:00 +0000 |
commit | d254189b38bb5b0b77a18a401c05c415ce0733c9 (patch) | |
tree | 7a0a2dfa9e20a356bc0ba94eb20a26bef0c353d1 /newlib/libc/stdlib/strdup_r.c | |
parent | 5e50e4e45c1f8758d431a6d881cd3da5572e8de7 (diff) | |
download | cygnal-d254189b38bb5b0b77a18a401c05c415ce0733c9.tar.gz cygnal-d254189b38bb5b0b77a18a401c05c415ce0733c9.tar.bz2 cygnal-d254189b38bb5b0b77a18a401c05c415ce0733c9.zip |
2002-07-23 Jeff Johnston <jjohnstn@redhat.com>
* 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.
Diffstat (limited to 'newlib/libc/stdlib/strdup_r.c')
-rw-r--r-- | newlib/libc/stdlib/strdup_r.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/newlib/libc/stdlib/strdup_r.c b/newlib/libc/stdlib/strdup_r.c deleted file mode 100644 index ef77a58eb..000000000 --- a/newlib/libc/stdlib/strdup_r.c +++ /dev/null @@ -1,17 +0,0 @@ -#include <reent.h> -#include <stdlib.h> -#include <string.h> - -char * -_DEFUN (_strdup_r, (reent_ptr, str), - struct _reent *reent_ptr _AND - _CONST char *str) -{ - size_t len = strlen (str) + 1; - char *copy = _malloc_r (reent_ptr, len); - if (copy) - { - memcpy (copy, str, len); - } - return copy; -} |