search for: __realpath

Displaying 1 result from an estimated 1 matches for "__realpath".

Did you mean: do_realpath
2014 Sep 27
2
[PATCH 1/2] Implement realpath()
...ctype/iscntrl.o ctype/isdigit.o \ ctype/isgraph.o ctype/islower.o ctype/isprint.o \ --- /dev/null +++ b/usr/klibc/realpath.c @@ -0,0 +1,147 @@ +#include <errno.h> +#include <limits.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <unistd.h> + +static char *__realpath(const char *name, char *resolved_name, int recurse) +{ + char link_target[PATH_MAX]; + struct stat st; + char *p, *end; + size_t comp_len; + int link_len; + int exists = 1; + int is_dir = 1; + + /* Keep or ignore base dir depending on whether name is relative */ + p = resolved_name; + if (*name !=...