aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/strdup.c
blob: edde384d98f681ed1d15b525cc93f0264136ee69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*-------------------------------------------------------------------------
 *
 * strdup.c--
 *	  copies a null-terminated string.
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *	  $Header: /cvsroot/pgsql/src/backend/port/Attic/strdup.c,v 1.1 1997/12/19 02:56:17 scrappy Exp $
 *
 *-------------------------------------------------------------------------
 */
#include <string.h>

#include <utils/palloc.h>

#include "port-protos.h"

char	   *
strdup(char const * string)
{
	char	   *nstr;

	nstr = strcpy((char *) palloc(strlen(string) + 1), string);
	return nstr;
}