aboutsummaryrefslogtreecommitdiffstats
path: root/libical/MacOS/strdup.c
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-02-18 02:02:37 +0800
committerSeth Alves <alves@src.gnome.org>2000-02-18 02:02:37 +0800
commit788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b (patch)
treef5f14715c1c0aede7eb872eda7166cd3ddcd7e3b /libical/MacOS/strdup.c
parentb39cda14b7678b925a6e3e645b60fb9858fdfaf6 (diff)
downloadgsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.gz
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.zst
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.zip
Initial revision
svn path=/trunk/; revision=1823
Diffstat (limited to 'libical/MacOS/strdup.c')
-rw-r--r--libical/MacOS/strdup.c17
1 files changed, 17 insertions, 0 deletions
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 <string.h>
+#include <stdlib.h>
+
+
+char *strdup(const char *s )
+{
+ char *p;
+
+ if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL )
+ return( NULL );
+
+ strcpy( p, s );
+
+ return( p );
+}