diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-14 00:58:03 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-14 00:58:03 +0000 |
commit | af0172162f7c653cad6a11ed1c1a5459bc154465 (patch) | |
tree | 70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/string/strndup.c | |
parent | c8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff) |
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/string/strndup.c')
-rw-r--r-- | libc/string/strndup.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libc/string/strndup.c b/libc/string/strndup.c index 5cee0272d..89c58ccec 100644 --- a/libc/string/strndup.c +++ b/libc/string/strndup.c @@ -8,18 +8,21 @@ #include "_string.h" #include <stdlib.h> -char attribute_hidden *__strndup(register const char *s1, size_t n) +libc_hidden_proto(strndup) +libc_hidden_proto(strnlen) +libc_hidden_proto(memcpy) + +char *strndup(register const char *s1, size_t n) { register char *s; - n = __strnlen(s1,n); /* Avoid problems if s1 not nul-terminated. */ + n = strnlen(s1,n); /* Avoid problems if s1 not nul-terminated. */ if ((s = malloc(n + 1)) != NULL) { - __memcpy(s, s1, n); + memcpy(s, s1, n); s[n] = 0; } return s; } - -strong_alias(__strndup,strndup) +libc_hidden_def(strndup) |