diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-01 20:43:44 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-01 20:43:44 +0000 |
commit | 8a0b43005ad9ea011b80d66e32b46fb430ddaffb (patch) | |
tree | 418818740042c5dbba244bc1efc760c8d29e47a9 /libc/stdlib/realpath.c | |
parent | 42b161bb716f35948fabd36472fb59cd0a20fa92 (diff) |
Hide mostly used functions
Diffstat (limited to 'libc/stdlib/realpath.c')
-rw-r--r-- | libc/stdlib/realpath.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c index c3628b745..7266ba4c6 100644 --- a/libc/stdlib/realpath.c +++ b/libc/stdlib/realpath.c @@ -59,11 +59,11 @@ char resolved_path[]; int n; /* Make a copy of the source path since we may need to modify it. */ - if (strlen(path) >= PATH_MAX - 2) { + if (__strlen(path) >= PATH_MAX - 2) { __set_errno(ENAMETOOLONG); return NULL; } - strcpy(copy_path, path); + __strcpy(copy_path, path); path = copy_path; max_path = copy_path + PATH_MAX - 2; /* If it's a relative pathname use getwd for starters. */ @@ -75,7 +75,7 @@ char resolved_path[]; #else getwd(new_path); #endif - new_path += strlen(new_path); + new_path += __strlen(new_path); if (new_path[-1] != '/') *new_path++ = '/'; } else { @@ -129,7 +129,7 @@ char resolved_path[]; if (errno != EINVAL) { /* Make sure it's null terminated. */ *new_path = '\0'; - strcpy(resolved_path, got_path); + __strcpy(resolved_path, got_path); return NULL; } } else { @@ -142,13 +142,13 @@ char resolved_path[]; /* Otherwise back up over this component. */ while (*(--new_path) != '/'); /* Safe sex check. */ - if (strlen(path) + n >= PATH_MAX - 2) { + if (__strlen(path) + n >= PATH_MAX - 2) { __set_errno(ENAMETOOLONG); return NULL; } /* Insert symlink contents into path. */ - strcat(link_path, path); - strcpy(copy_path, link_path); + __strcat(link_path, path); + __strcpy(copy_path, link_path); path = copy_path; } #endif /* S_IFLNK */ @@ -159,6 +159,6 @@ char resolved_path[]; new_path--; /* Make sure it's null terminated. */ *new_path = '\0'; - strcpy(resolved_path, got_path); + __strcpy(resolved_path, got_path); return resolved_path; } |