diff options
Diffstat (limited to 'unsupported/tandem/strdup.c')
-rw-r--r-- | unsupported/tandem/strdup.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/unsupported/tandem/strdup.c b/unsupported/tandem/strdup.c new file mode 100644 index 00000000..45f7676c --- /dev/null +++ b/unsupported/tandem/strdup.c @@ -0,0 +1,15 @@ +/* + * strdup --- duplicate a string + * + * We supply this routine for those systems that aren't standard yet. + */ + +char * +strdup (str) +register const char *str; +{ + char *p; + + p=(char *)malloc(strlen(str)+1); + return strcpy(p,str); +} |