diff --git a/include/stdlib.h b/include/stdlib.h
index 352339e8595eb8229018cb27f7d2decf63f511c7..929cead59ae10afe03ae1286b72d8321f0ab2d90 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,16 +1,12 @@
Â #ifndef _STDLIB_H
Â 
-#ifdef __need_malloc_and_calloc
-#define __Need_M_And_C
-#endif
-
Â #ifndef _ISOMAC
Â # include <stddef.h>
Â #endif
Â #include <stdlib/stdlib.h>
Â 
Â /* Now define the internal interfaces.Â  */
-#if !defined __Need_M_And_C && !defined _ISOMAC
+#if !defined _ISOMAC
Â # include <sys/stat.h>
Â 
Â __BEGIN_DECLS
@@ -269,6 +265,4 @@ __END_DECLS
Â 
Â #endif
Â 
-#undef __Need_M_And_C
-
Â #endifÂ  /* include/stdlib.h */
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 292c6a2f053a2a578cd09d75307c26ed191e1c00..7cfbcafe79ec1f7c9d07c464bd56b9bd964755fd 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -25,16 +25,13 @@
Â #include <bits/libc-header-start.h>
Â 
Â /* Get size_t, wchar_t and NULL from <stddef.h>.Â  */
-#defineÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __need_size_t
-#ifndef __need_malloc_and_calloc
-# defineÂ Â Â Â Â Â  __need_wchar_t
-# defineÂ Â Â Â Â Â  __need_NULL
-#endif
+#define __need_size_t
+#define __need_wchar_t
+#define __need_NULL
Â #include <stddef.h>
Â 
Â __BEGIN_DECLS
Â 
-#ifndef __need_malloc_and_calloc
Â #define _STDLIB_HÂ Â Â Â Â Â  1
Â 
Â #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
@@ -434,10 +431,6 @@ extern int lcong48_r (unsigned short int __param[7],
Â # endif /* Use misc.Â  */
Â #endifÂ  /* Use misc or X/Open.Â  */
Â 
-#endif /* don't just need malloc and calloc */
-
-#ifndef __malloc_and_calloc_defined
-# define __malloc_and_calloc_defined
Â __BEGIN_NAMESPACE_STD
Â /* Allocate SIZE bytes of memory.Â  */
Â extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
@@ -445,9 +438,7 @@ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
Â extern void *calloc (size_t __nmemb, size_t __size)
Â Â Â Â Â  __THROW __attribute_malloc__ __wur;
Â __END_NAMESPACE_STD
-#endif
Â 
-#ifndef __need_malloc_and_calloc
Â __BEGIN_NAMESPACE_STD
Â /* Re-allocate the previously allocated block
Â Â Â  in PTR, making the new block SIZE bytes long.Â  */
@@ -944,9 +935,6 @@ extern int ttyslot (void) __THROW;
Â # include <bits/stdlib-ldbl.h>
Â #endif
Â 
-#endif /* don't just need malloc and calloc */
-#undef __need_malloc_and_calloc
-
Â __END_DECLS
Â 
Â #endif /* stdlib.hÂ  */
diff --git a/string/bits/string2.h b/string/bits/string2.h
index e5337becf6fd21a7f303f4e9e8152f8571ec96b1..5d2bd0c8e2f39df6c7a407253e5995d9bb0f6cdb 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -180,65 +180,6 @@ extern void *__rawmemchr (const void *__s, int __c);
Â #endif
Â 
Â 
-/* We need the memory allocation functions for inline strdup().
-Â Â  Referring to stdlib.h (even minimally) is not allowed
-Â Â  in any of the tight standards compliant modes.Â  */
-#ifdef __USE_MISC
-
-# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup
-#Â  define __need_malloc_and_calloc
-#Â  include <stdlib.h>
-# endif
-
-# ifndef _HAVE_STRING_ARCH_strdup
-
-extern char *__strdup (const char *__string) __THROW __attribute_malloc__;
-#Â  define __strdup(s) \
-Â  (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s)Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ? (((const char *) (s))[0] == '\0'Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ? (char *) calloc ((size_t) 1, (size_t) 1)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  : ({ size_t __len = strlen (s) + 1;Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  char *__retval = (char *) malloc (__len);Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (__retval != NULL)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __retval = (char *) memcpy (__retval, s, __len);Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __retval; }))Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  : __strdup (s)))
-
-#Â  if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
-#Â Â  define strdup(s) __strdup (s)
-#Â  endif
-# endif
-
-# ifndef _HAVE_STRING_ARCH_strndup
-
-extern char *__strndup (const char *__string, size_t __n)
-Â Â Â Â  __THROW __attribute_malloc__;
-#Â  define __strndup(s, n) \
-Â  (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s)Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ? (((const char *) (s))[0] == '\0'Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ? (char *) calloc ((size_t) 1, (size_t) 1)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  : ({ size_t __len = strlen (s) + 1;Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  size_t __n = (n);Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  char *__retval;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (__n < __len)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __len = __n + 1;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __retval = (char *) malloc (__len);Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (__retval != NULL)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __retval[__len - 1] = '\0';Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __retval = (char *) memcpy (__retval, s,Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __len - 1);Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  }Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __retval; }))Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  \
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  : __strndup (s, n)))
-
-#Â  ifdef __USE_XOPEN2K8
-#Â Â  define strndup(s, n) __strndup (s, n)
-#Â  endif
-# endif
-
-#endif /* Use misc. or use GNU.Â  */
-
Â #ifndef _FORCE_INLINES
Â # undef __STRING_INLINE
Â #endif
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 1ac7524c3e8cc41eee0e4f20158b67f97a0f60bc..017c78aae36cd981f31b955966bb77c9b793567a 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -302,7 +302,7 @@ _dl_load_cache_lookup (const char *name)
Â Â  char *temp;
Â Â  temp = alloca (strlen (best) + 1);
Â Â  strcpy (temp, best);
-Â  return strdup (temp);
+Â  return __strdup (temp);
Â }
Â 
Â #ifndef MAP_COPY
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 8613d96764b08cc8fe3d988a0f38125a0cd54d04..b7cc7a82ba0ac1b39ccf03c589e00114b0bc79a5 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -149,7 +149,7 @@ rcmd_af (char **ahost, u_short rport, const char *locuser, const char *remuser,
Â 
Â Â Â Â Â Â Â Â  if (res->ai_canonname){
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  free (ahostbuf);
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ahostbuf = strdup (res->ai_canonname);
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ahostbuf = __strdup (res->ai_canonname);
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (ahostbuf == NULL) {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __fxprintf(NULL, "%s",
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  _("rcmd: Cannot allocate memory\n"));
diff --git a/inet/rexec.c b/inet/rexec.c
index 24ac4b11b6d745aa53a80bd0f7bd10924246b526..43fb67bcf2c6d4fdff9e8dcd053786ab523f7aa1 100644
--- a/inet/rexec.c
+++ b/inet/rexec.c
@@ -73,7 +73,7 @@ rexec_af (char **ahost, int rport, const char *name, const char *pass,
Â 
Â Â Â Â Â Â Â Â  if (res0->ai_canonname){
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  free (ahostbuf);
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ahostbuf = strdup (res0->ai_canonname);
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ahostbuf = __strdup (res0->ai_canonname);
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (ahostbuf == NULL) {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  perror ("rexec: strdup");
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  return (-1);
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index 95fa72b1c548ee66d9771eac86488f7f034a0c89..2c7358796eb7853f31773ad8f5e6b89ee94ec5db 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -131,6 +131,9 @@ extern int errno;
Â /* 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.Â  */
+# ifndef strdup
+#Â  define strdup __strdup
+# endif
Â # define getcwd __getcwd
Â # ifndef stpcpy
Â #Â  define stpcpy __stpcpy
diff --git a/intl/finddomain.c b/intl/finddomain.c
index cb61a0c8d6b90023847ef0cc609524a0c0a070a0..88fd880dbcc3e21cd4975306f1196a906116d1cc 100644
--- a/intl/finddomain.c
+++ b/intl/finddomain.c
@@ -124,18 +124,12 @@ _nl_find_domain (const char *dirname, char *locale,
Â Â  alias_value = _nl_expand_alias (locale);
Â Â  if (alias_value != NULL)
Â Â Â Â  {
-#if defined _LIBC || defined HAVE_STRDUP
-Â Â Â Â Â  locale = strdup (alias_value);
-Â Â Â Â Â  if (locale == NULL)
-Â Â Â Â Â Â  return NULL;
-#else
Â Â Â Â Â Â  size_t len = strlen (alias_value) + 1;
Â Â Â Â Â Â  locale = (char *) malloc (len);
Â Â Â Â Â Â  if (locale == NULL)
Â Â Â Â Â Â Â Â  return NULL;
Â 
Â Â Â Â Â Â  memcpy (locale, alias_value, len);
-#endif
Â Â Â Â  }
Â 
Â Â  /* Now we determine the single parts of the locale name.Â  First
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index fc6fb32a9d706c0501f83b166d3aa73a19c9c58f..e6e1a05d2e7b74abf81d136760f0c42d58744f57 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -462,7 +462,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
Â Â  if (__glibc_unlikely (lia == NULL))
Â Â Â Â  return NULL;
Â 
-Â  lia->name = strdup (*namep);
+Â  lia->name = __strdup (*namep);
Â Â  if (__glibc_unlikely (lia->name == NULL))
Â Â Â Â  {
Â Â Â Â Â Â  free (lia);
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 1603ef306a51a8fe9368a617eae67310b77ffb0f..19acc4b2c7173ece3b235f289c57c4c74f3da5cc 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -283,7 +283,7 @@ setlocale (int category, const char *locale)
Â Â Â Â Â Â  if (__glibc_unlikely (strchr (locale, ';') != NULL))
Â Â Â Â Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â  /* This is a composite name.Â  Make a copy and split it up.Â  */
-Â Â Â Â Â Â Â Â  locale_copy = strdup (locale);
+Â Â Â Â Â Â Â Â  locale_copy = __strdup (locale);
Â Â Â Â Â Â Â Â Â Â  if (__glibc_unlikely (locale_copy == NULL))
Â Â Â Â Â Â Â Â Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â  __libc_rwlock_unlock (__libc_setlocale_lock);
diff --git a/posix/spawn_faction_addopen.c b/posix/spawn_faction_addopen.c
index 95111684bc4ea2f5dd82cc8287cc9ba0db6d9cb1..cbb3584345374e19b37560e4081c618bbb76d707 100644
--- a/posix/spawn_faction_addopen.c
+++ b/posix/spawn_faction_addopen.c
@@ -34,7 +34,7 @@ posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions,
Â Â  if (!__spawn_valid_fd (fd))
Â Â Â Â  return EBADF;
Â 
-Â  char *path_copy = strdup (path);
+Â  char *path_copy = __strdup (path);
Â Â  if (path_copy == NULL)
Â Â Â Â  return ENOMEM;
Â 
diff --git a/stdlib/putenv.c b/stdlib/putenv.c
index 85890fec264cda0f7d1f6e4bc411b6e2f95af048..c0488fc50558ef2fc2878cdbe436e76276fa3898 100644
--- a/stdlib/putenv.c
+++ b/stdlib/putenv.c
@@ -60,7 +60,7 @@ putenv (char *string)
Â Â Â Â Â Â  int use_malloc = !__libc_use_alloca (name_end - string + 1);
Â Â Â Â Â Â  if (__builtin_expect (use_malloc, 0))
Â Â Â Â Â Â Â Â  {
-Â Â Â Â Â Â Â Â  name = strndup (string, name_end - string);
+Â Â Â Â Â Â Â Â  name = __strndup (string, name_end - string);
Â Â Â Â Â Â Â Â Â Â  if (name == NULL)
Â Â Â Â Â Â Â Â Â Â Â Â  return -1;
Â Â Â Â Â Â Â Â  }
diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c
index baa177eec0f1fea3306e056033be29cee42fe132..acc9b9db14fa24b4b04e4ddca7d10980e661fe88 100644
--- a/sunrpc/svc_simple.c
+++ b/sunrpc/svc_simple.c
@@ -87,7 +87,7 @@ __registerrpc (u_long prognum, u_long versnum, u_long procnum,
Â Â Â Â Â Â  transp = svcudp_create (RPC_ANYSOCK);
Â Â Â Â Â Â  if (transp == NULL)
Â Â Â Â Â Â Â Â  {
-Â Â Â Â Â Â Â Â  buf = strdup (_("couldn't create an rpc server\n"));
+Â Â Â Â Â Â Â Â  buf = __strdup (_("couldn't create an rpc server\n"));
Â Â Â Â Â Â Â Â Â Â  goto err_out;
Â Â Â Â Â Â Â Â  }
Â Â Â Â  }
@@ -103,7 +103,7 @@ __registerrpc (u_long prognum, u_long versnum, u_long procnum,
Â Â  pl = (struct proglst_ *) malloc (sizeof (struct proglst_));
Â Â  if (pl == NULL)
Â Â Â Â  {
-Â Â Â Â Â  buf = strdup (_("registerrpc: out of memory\n"));
+Â Â Â Â Â  buf = __strdup (_("registerrpc: out of memory\n"));
Â Â Â Â Â Â  goto err_out;
Â Â Â Â  }
Â Â  pl->p_progname = progname;
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 43eb31365ed10059bb6e1147af197ed54550e6c5..eed7264850307b6b65b055a6936dc6362d5b3ff9 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -536,7 +536,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  }
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  else
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  namebuf = strndup (name, scope_delim - name);
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  namebuf = __strndup (name, scope_delim - name);
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (namebuf == NULL)
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  assert (!malloc_name);
@@ -1141,7 +1141,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  malloc_canonbuf = false;
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  else
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  canon = strdup (canon);
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  canon = __strdup (canon);
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  if (canon == NULL)
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  result = -EAI_MEMORY;
