1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2013 Free Software
6 This file is part of the GNU C Library.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, see <http://www.gnu.org/licenses/>. */
25 /* Get specification. */
36 # define __strdup strdup
39 /* Duplicate S, returning an identical malloc'd string. */
41 __strdup (const char *s)
43 size_t len = strlen (s) + 1;
44 void *new = malloc (len);
49 return (char *) memcpy (new, s, len);
51 #ifdef libc_hidden_def
52 libc_hidden_def (__strdup)
55 weak_alias (__strdup, strdup)