From: Bryan Henderson <bryanh@giraffe.netgate.net>
Date: Wed, 27 Nov 1996 01:46:52 +0000 (+0000)
Subject: Forgot in yesterday's Ultrix compile work.
X-Git-Tag: REL2_0~52
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89c7e18b3f890543df161bcab1c4fdbbc420c785;p=postgresql

Forgot in yesterday's Ultrix compile work.
---

diff --git a/src/utils/strdup.c b/src/utils/strdup.c
new file mode 100644
index 0000000000..a59cc50578
--- /dev/null
+++ b/src/utils/strdup.c
@@ -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;
+}