Return to getcwd.c CVS log | Up to [cvs.NetBSD.org] / src / lib / libc / gen |
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. |
version 1.38, 2005/07/05 02:56:12 | version 1.39, 2005/08/13 19:53:53 | ||
---|---|---|---|
|
|
||
* target to unresolved path. | * target to unresolved path. | ||
*/ | */ | ||
if (lstat(resolved, &sb) == -1) { | if (lstat(resolved, &sb) == -1) { | ||
/* Allow nonexistent component if this is the last one. */ | |||
while (*q == '/') | |||
q++; | |||
if (*q == 0 && errno == ENOENT) { | |||
errno = serrno; | |||
return (resolved); | |||
} | |||
return (NULL); | return (NULL); | ||
} | } | ||
if (S_ISLNK(sb.st_mode)) { | if (S_ISLNK(sb.st_mode)) { |