From 15eaca1c3fadd40d41d0f61cb656923be443c577 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 3 Nov 2005 20:47:50 +0000 Subject: 2005-11-03 Jeff Johnston * libc/unix/getcwd.c: Don't use non-reentrant syscall names. * libc/unix/getlogin.c: Ditto. * libc/unix/getpass.c: Ditto. * libc/unix/getut.c: Ditto. * libc/unix/ttyname.c: Ditto. --- newlib/libc/unix/getcwd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'newlib/libc/unix/getcwd.c') diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c index 826fc789d..f57e14742 100644 --- a/newlib/libc/unix/getcwd.c +++ b/newlib/libc/unix/getcwd.c @@ -124,7 +124,7 @@ getcwd (pt, size) for (first = 1;; first = 0) { /* Stat the current level. */ - if (_stat (up, &s)) + if (stat (up, &s)) goto err; /* Save current node values. */ @@ -165,7 +165,7 @@ getcwd (pt, size) *bup = '\0'; /* Open and stat parent directory. */ - if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) + if (!(dir = opendir (up)) || fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ @@ -182,7 +182,7 @@ getcwd (pt, size) { for (;;) { - if (!(dp = _readdir (dir))) + if (!(dp = readdir (dir))) goto notfound; if (dp->d_ino == ino) break; @@ -191,7 +191,7 @@ getcwd (pt, size) else for (;;) { - if (!(dp = _readdir (dir))) + if (!(dp = readdir (dir))) goto notfound; if (ISDOT (dp)) continue; @@ -238,7 +238,7 @@ getcwd (pt, size) *--bpt = '/'; bpt -= strlen (dp->d_name); bcopy (dp->d_name, bpt, strlen (dp->d_name)); - (void) _closedir (dir); + (void) closedir (dir); /* Truncate any file name. */ *bup = '\0'; -- cgit v1.2.3