From 788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 17 Feb 2000 18:02:37 +0000 Subject: Initial revision svn path=/trunk/; revision=1823 --- libical/MacOS/strdup.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 libical/MacOS/strdup.c (limited to 'libical/MacOS/strdup.c') diff --git a/libical/MacOS/strdup.c b/libical/MacOS/strdup.c new file mode 100644 index 0000000000..ae60fee3df --- /dev/null +++ b/libical/MacOS/strdup.c @@ -0,0 +1,17 @@ + +#include "strdup.h" +#include +#include + + +char *strdup(const char *s ) +{ + char *p; + + if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) + return( NULL ); + + strcpy( p, s ); + + return( p ); +} -- cgit v1.2.3