+
+#ifndef strdup
+# include <string.h>
+# ifdef __STDC__
+ char *strdup(const char *s)
+# else
+ char *strdup(s)
+ char *s;
+# endif
+ {
+ size_t len = strlen(s) + 1;
+ char * result = ((char *)REDIRECT_MALLOC(len+1));
+ BCOPY(s, result, len+1);
+ return result;
+ }
+#endif /* !defined(strdup) */
+ /* If strdup is macro defined, we assume that it actually calls malloc, */
+ /* and thus the right thing will happen even without overriding it. */
+ /* This seems to be true on most Linux systems. */
+
+#undef GC_debug_malloc_replacement
+