summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-03-28 05:07:08 +0000
committerDJ Delorie <dj@redhat.com>2005-03-28 05:07:08 +0000
commit1e45deed6a87c05c9e669e3cdfdda47cbfa9531d (patch)
treee2c1bba3c03c5917c8e70792a921dfc6b6b5eef9 /libiberty/strdup.c
parentmerge from gcc (diff)
downloadbinutils-gdb-1e45deed6a87c05c9e669e3cdfdda47cbfa9531d.tar.gz
binutils-gdb-1e45deed6a87c05c9e669e3cdfdda47cbfa9531d.tar.bz2
binutils-gdb-1e45deed6a87c05c9e669e3cdfdda47cbfa9531d.zip
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);