/* strdup.c (emx+gcc) -- Copyright (c) 1990-1993 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);
}
