Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/unix/getcwd.c')
-rw-r--r--newlib/libc/unix/getcwd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c
index f57e14742..826fc789d 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';