summaryrefslogtreecommitdiff
path: root/libiberty/strdup.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2005-03-28 05:07:08 +0000
committerDJ Delorie <dj@delorie.com>2005-03-28 05:07:08 +0000
commiteb0e4f9cefc1d530da0654474f7a909f07ee77d3 (patch)
tree5f0563b072f5e292e6c10e44250653ca9048f83c /libiberty/strdup.c
parent330f7c1a6218d3b4a10b5b571eee65f3d53b64ac (diff)
downloadgdb-eb0e4f9cefc1d530da0654474f7a909f07ee77d3.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/strdup.c')
-rw-r--r--libiberty/strdup.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libiberty/strdup.c b/libiberty/strdup.c
index a3f17d3bcb1..78c2093b61a 100644
--- a/libiberty/strdup.c
+++ b/libiberty/strdup.c
@@ -10,19 +10,14 @@ Returns a pointer to a copy of @var{s} in memory obtained from
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-extern size_t strlen PARAMS ((const char*));
-extern PTR malloc PARAMS ((size_t));
-extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
+extern size_t strlen (const char*);
+extern PTR malloc (size_t);
+extern PTR memcpy (PTR, const PTR, size_t);
char *
-strdup(s)
- const char *s;
+strdup(const char *s)
{
size_t len = strlen (s) + 1;
char *result = (char*) malloc (len);