]> git.sur5r.net Git - openldap/commitdiff
Forgot to add new string.c.
authorKurt Zeilenga <kurt@openldap.org>
Sun, 24 Jan 1999 01:07:52 +0000 (01:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 24 Jan 1999 01:07:52 +0000 (01:07 +0000)
libraries/libldap/string.c [new file with mode: 0644]

diff --git a/libraries/libldap/string.c b/libraries/libldap/string.c
new file mode 100644 (file)
index 0000000..a251a66
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "portable.h"
+
+#include <stdlib.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#include "ldap-int.h"
+
+char *
+(ldap_pvt_strdup)( const char *s )
+{
+        char    *p;
+       int     len;
+       len = strlen( s ) + 1;
+        if ( (p = (char *) malloc( len )) == NULL )
+                return( (char *)0 );
+
+        memcpy( p, s, len );
+
+        return( p );
+}