+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * xmemdup.c, xstrdup.c: Expose the tail call.
+
2005-03-09 Mark Mitchell <mark@codesourcery.com>
* configure.ac (funcs): Add gettimeofday.
#include <sys/types.h> /* For size_t. */
#ifdef HAVE_STRING_H
#include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
#endif
PTR
size_t alloc_size;
{
PTR output = xcalloc (1, alloc_size);
- memcpy (output, input, copy_size);
- return output;
+ return (PTR) memcpy (output, input, copy_size);
}
#endif
#ifdef HAVE_STRING_H
#include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
#endif
#include "ansidecl.h"
#include "libiberty.h"
{
register size_t len = strlen (s) + 1;
register char *ret = xmalloc (len);
- memcpy (ret, s, len);
- return ret;
+ return (char *) memcpy (ret, s, len);
}