/* strdup.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */

#include <string.h>
#include <stdlib.h>

char *_strdup (const char *string)
{
  char *p;
  size_t n;

  n = strlen (string) + 1;
  p = malloc (n);
  if (p != NULL)
    memcpy (p, string, n);
  return p;
}
