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/getut.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'newlib/libc/unix/getut.c') diff --git a/newlib/libc/unix/getut.c b/newlib/libc/unix/getut.c index 1e2b75596..554ed3ca1 100644 --- a/newlib/libc/unix/getut.c +++ b/newlib/libc/unix/getut.c @@ -16,15 +16,15 @@ setutent () { if (utmp_fd == -2) { - utmp_fd = _open (utmp_file, O_RDONLY); + utmp_fd = open (utmp_file, O_RDONLY); } - _lseek (utmp_fd, 0, SEEK_SET); + lseek (utmp_fd, 0, SEEK_SET); } void endutent () { - _close (utmp_fd); + close (utmp_fd); utmp_fd = -2; } @@ -39,7 +39,7 @@ getutent () { if (utmp_fd == -2) setutent (); - if (_read (utmp_fd, &utmp_data, sizeof (utmp_data)) < sizeof (utmp_data)) + if (read (utmp_fd, &utmp_data, sizeof (utmp_data)) < sizeof (utmp_data)) return 0; return &utmp_data; } @@ -47,7 +47,7 @@ getutent () struct utmp * getutid (struct utmp *id) { - while (_read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) + while (read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) { switch (id->ut_type) { @@ -73,7 +73,7 @@ getutid (struct utmp *id) struct utmp * getutline (struct utmp *line) { - while (_read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) + while (read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) { if ((utmp_data.ut_type == LOGIN_PROCESS || utmp_data.ut_type == USER_PROCESS) && -- cgit v1.2.3