diff options
author | DJ Delorie <dj@redhat.com> | 2005-03-28 05:07:08 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-03-28 05:07:08 +0000 |
commit | 1e45deed6a87c05c9e669e3cdfdda47cbfa9531d (patch) | |
tree | e2c1bba3c03c5917c8e70792a921dfc6b6b5eef9 /libiberty/stpncpy.c | |
parent | 49b1fae4309ab5b9833f0af388483c2b6b4b3d50 (diff) | |
download | binutils-gdb-1e45deed6a87c05c9e669e3cdfdda47cbfa9531d.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty/stpncpy.c')
-rw-r--r-- | libiberty/stpncpy.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libiberty/stpncpy.c b/libiberty/stpncpy.c index cb67b4dbab1..b885d85bde2 100644 --- a/libiberty/stpncpy.c +++ b/libiberty/stpncpy.c @@ -32,20 +32,13 @@ strlen(@var{src}). */ #include <ansidecl.h> -#ifdef ANSI_PROTOTYPES #include <stddef.h> -#else -#define size_t unsigned long -#endif -extern size_t strlen PARAMS ((const char *)); -extern char *strncpy PARAMS ((char *, const char *, size_t)); +extern size_t strlen (const char *); +extern char *strncpy (char *, const char *, size_t); char * -stpncpy (dst, src, len) - char *dst; - const char *src; - size_t len; +stpncpy (char *dst, const char *src, size_t len) { size_t n = strlen (src); if (n > len) |