date and time created 91/03/06 18:09:53 by bostic
[unix-history] / usr / src / lib / libc / string / strdup.c
index 82828e0..c900cb1 100644 (file)
@@ -6,20 +6,19 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strdup.c   5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)strdup.c   5.4 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
-#include <sys/types.h>
 #include <stddef.h>
 #include <stddef.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <string.h>
 
-
 char *
 strdup(str)
 char *
 strdup(str)
-       char *str;
+       const char *str;
 {
        int len;
 {
        int len;
-       char *copy, *malloc();
+       char *copy;
 
        len = strlen(str) + 1;
        if (!(copy = malloc((u_int)len)))
 
        len = strlen(str) + 1;
        if (!(copy = malloc((u_int)len)))