mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
1998-05-23 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/unix/sysv/linux/arm/syscalls.list: Add `syscall'. * sysdeps/unix/sysv/linux/arm/syscall.S: Deleted. 1998-07-05 Ulrich Drepper <drepper@cygnus.com> * misc/getttyent.c (getttyent): Explicitly lock the FILE and use _unlocked functions. * inet/ruserpass.c (ruserpass): Use _unlocked functions since this is a private FILE.
This commit is contained in:
@ -71,12 +71,13 @@ getttyent()
|
||||
|
||||
if (!tf && !setttyent())
|
||||
return (NULL);
|
||||
flockfile (tf);
|
||||
for (;;) {
|
||||
if (!fgets(p = line, sizeof(line), tf))
|
||||
return (NULL);
|
||||
/* skip lines that are too big */
|
||||
if (!index(p, '\n')) {
|
||||
while ((c = getc(tf)) != '\n' && c != EOF)
|
||||
while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
|
||||
;
|
||||
continue;
|
||||
}
|
||||
@ -85,6 +86,7 @@ getttyent()
|
||||
if (*p && *p != '#')
|
||||
break;
|
||||
}
|
||||
funlockfile(tf);
|
||||
|
||||
zapchar = 0;
|
||||
tty.ty_name = p;
|
||||
|
Reference in New Issue
Block a user