]> granicus.if.org Git - postgresql/commitdiff
Forgot in yesterday's Ultrix compile work.
authorBryan Henderson <bryanh@giraffe.netgate.net>
Wed, 27 Nov 1996 01:46:52 +0000 (01:46 +0000)
committerBryan Henderson <bryanh@giraffe.netgate.net>
Wed, 27 Nov 1996 01:46:52 +0000 (01:46 +0000)
src/utils/strdup.c [new file with mode: 0644]

diff --git a/src/utils/strdup.c b/src/utils/strdup.c
new file mode 100644 (file)
index 0000000..a59cc50
--- /dev/null
@@ -0,0 +1,24 @@
+/*-------------------------------------------------------------------------
+ *
+ * strdup.c--
+ *    copies a null-terminated string.
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ *    $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.1 1996/11/27 01:46:52 bryanh Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <string.h>
+#include "strdup.h"
+
+char *
+strdup(char *string)
+{
+    char *nstr;
+
+    nstr = strcpy((char *)palloc(strlen(string)+1), string);
+    return nstr;
+}