aboutsummaryrefslogtreecommitdiff
path: root/libiberty/strdup.c
diff options
context:
space:
mode:
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 a3f17d3..78c2093 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);