diff options
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r-- | newlib/libc/stdlib/Makefile.am | 2 | ||||
-rw-r--r-- | newlib/libc/stdlib/Makefile.in | 13 | ||||
-rw-r--r-- | newlib/libc/stdlib/strdup.c | 13 | ||||
-rw-r--r-- | newlib/libc/stdlib/strdup_r.c | 17 |
4 files changed, 5 insertions, 40 deletions
diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am index 4aee696a4..13608eafd 100644 --- a/newlib/libc/stdlib/Makefile.am +++ b/newlib/libc/stdlib/Makefile.am @@ -67,8 +67,6 @@ LIB_SOURCES = \ setenv.c \ setenv_r.c \ srand48.c \ - strdup.c \ - strdup_r.c \ strtod.c \ strtol.c \ strtoll.c \ diff --git a/newlib/libc/stdlib/Makefile.in b/newlib/libc/stdlib/Makefile.in index 6e731b415..98b64b84e 100644 --- a/newlib/libc/stdlib/Makefile.in +++ b/newlib/libc/stdlib/Makefile.in @@ -173,8 +173,6 @@ LIB_SOURCES = \ setenv.c \ setenv_r.c \ srand48.c \ - strdup.c \ - strdup_r.c \ strtod.c \ strtol.c \ strtoll.c \ @@ -290,8 +288,7 @@ LIBS = @LIBS@ @USE_LIBTOOL_FALSE@putenv_r.$(OBJEXT) rand.$(OBJEXT) rand48.$(OBJEXT) \ @USE_LIBTOOL_FALSE@rand_r.$(OBJEXT) realloc.$(OBJEXT) seed48.$(OBJEXT) \ @USE_LIBTOOL_FALSE@setenv.$(OBJEXT) setenv_r.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@srand48.$(OBJEXT) strdup.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@strdup_r.$(OBJEXT) strtod.$(OBJEXT) strtol.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@srand48.$(OBJEXT) strtod.$(OBJEXT) strtol.$(OBJEXT) \ @USE_LIBTOOL_FALSE@strtoll.$(OBJEXT) strtoll_r.$(OBJEXT) \ @USE_LIBTOOL_FALSE@strtoul.$(OBJEXT) strtoull.$(OBJEXT) \ @USE_LIBTOOL_FALSE@strtoull_r.$(OBJEXT) system.$(OBJEXT) \ @@ -318,10 +315,10 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_LIBTOOL_TRUE@msize.lo mstats.lo mtrim.lo nrand48.lo on_exit.lo \ @USE_LIBTOOL_TRUE@putenv.lo putenv_r.lo rand.lo rand48.lo rand_r.lo \ @USE_LIBTOOL_TRUE@realloc.lo seed48.lo setenv.lo setenv_r.lo srand48.lo \ -@USE_LIBTOOL_TRUE@strdup.lo strdup_r.lo strtod.lo strtol.lo strtoll.lo \ -@USE_LIBTOOL_TRUE@strtoll_r.lo strtoul.lo strtoull.lo strtoull_r.lo \ -@USE_LIBTOOL_TRUE@system.lo valloc.lo wcstombs.lo wcstombs_r.lo \ -@USE_LIBTOOL_TRUE@wctomb.lo wctomb_r.lo +@USE_LIBTOOL_TRUE@strtod.lo strtol.lo strtoll.lo strtoll_r.lo \ +@USE_LIBTOOL_TRUE@strtoul.lo strtoull.lo strtoull_r.lo system.lo \ +@USE_LIBTOOL_TRUE@valloc.lo wcstombs.lo wcstombs_r.lo wctomb.lo \ +@USE_LIBTOOL_TRUE@wctomb_r.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) diff --git a/newlib/libc/stdlib/strdup.c b/newlib/libc/stdlib/strdup.c deleted file mode 100644 index dbb069264..000000000 --- a/newlib/libc/stdlib/strdup.c +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _REENT_ONLY - -#include <reent.h> -#include <stdlib.h> -#include <string.h> - -char * -_DEFUN (strdup, (str), _CONST char *str) -{ - return _strdup_r (_REENT, str); -} - -#endif /* !_REENT_ONLY */ 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; -} |