Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/gen
Quentin Garnier wrote:
> Please re-re-re-revert (or whatever) that change.
Test attached patch.
-e.
--
Elad Efrat
Index: getcwd.c
===================================================================
RCS file: /cvsroot/src/lib/libc/gen/getcwd.c,v
retrieving revision 1.41
diff -u -p -r1.41 getcwd.c
--- getcwd.c 22 Dec 2005 23:29:23 -0000 1.41
+++ getcwd.c 31 Dec 2005 00:15:36 -0000
@@ -69,7 +69,7 @@ char *
realpath(const char *path, char *resolved)
{
struct stat sb;
- int idx = 0, n, nlnk = 0;
+ int idx = 0, n, nlnk = 0, serrno = errno;
const char *q;
char *p, wbuf[2][MAXPATHLEN];
size_t len;
@@ -163,8 +163,10 @@ loop:
while (*q == '/')
q++;
- if (*q == 0 && errno == ENOENT)
+ if (*q == 0 && errno == ENOENT) {
+ errno = serrno;
return (resolved);
+ }
return (NULL);
}
Home |
Main Index |
Thread Index |
Old Index