diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-11-03 20:47:50 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-11-03 20:47:50 +0000 |
commit | 15eaca1c3fadd40d41d0f61cb656923be443c577 (patch) | |
tree | fbf4c19ebb71cf021569dbc294e146162dc664d6 /newlib/libc/unix/ttyname.c | |
parent | d31a862312eebff8f99e28f30d245248408b538b (diff) | |
download | cygnal-15eaca1c3fadd40d41d0f61cb656923be443c577.tar.gz cygnal-15eaca1c3fadd40d41d0f61cb656923be443c577.tar.bz2 cygnal-15eaca1c3fadd40d41d0f61cb656923be443c577.zip |
2005-11-03 Jeff Johnston <jjohnstn@redhat.com>
* 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.
Diffstat (limited to 'newlib/libc/unix/ttyname.c')
-rw-r--r-- | newlib/libc/unix/ttyname.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/unix/ttyname.c b/newlib/libc/unix/ttyname.c index 558f70939..09f12a337 100644 --- a/newlib/libc/unix/ttyname.c +++ b/newlib/libc/unix/ttyname.c @@ -62,13 +62,13 @@ ttyname (fd) return NULL; /* Must be a character device. */ - if (_fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) + if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) return NULL; - if ((dp = _opendir (_PATH_DEV)) == NULL) + if ((dp = opendir (_PATH_DEV)) == NULL) return NULL; - while ((dirp = _readdir (dp)) != NULL) + while ((dirp = readdir (dp)) != NULL) { if (dirp->d_ino != sb.st_ino) continue; @@ -76,9 +76,9 @@ ttyname (fd) if (stat (buf, &dsb) || sb.st_dev != dsb.st_dev || sb.st_ino != dsb.st_ino) continue; - (void) _closedir (dp); + (void) closedir (dp); return buf; } - (void) _closedir (dp); + (void) closedir (dp); return NULL; } |