Apply commit
2017-03-13 Wilco Dijkstra <wdijkstr@arm.com>
Remove the str(n)dup inlines from string/bits/string2.h...
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
+# define strdup __strdup
# define getcwd __getcwd
# ifndef stpcpy
# define stpcpy __stpcpy
alias_value = _nl_expand_alias (locale);
if (alias_value != NULL)
{
- locale = strdup (alias_value);
+ size_t len = strlen (alias_value) + 1;
+ locale = (char *) malloc (len);
if (locale == NULL)
- return NULL;
+ return NULL;
+
+ memcpy (locale, alias_value, len);
}
/* Now we determine the single parts of the locale name. First