mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Update.
1998-07-05 11:49 Ulrich Drepper <drepper@cygnus.com> * iconv/gconv_conf.c (read_conf_file): Use feof_unlocked on private stream. * inet/ruserpass.c (token): Likewise. * nss/nsswitch.c (nss_parse_file): Likewise. * intl/localealias.c: Likewise. Also for ferror. * time/getdate.c (__getdate_r): Likewise. * libio/Makefile (routines): Add iofgets_u. * libio/iofgets_u.c: New file. * libio/Versions: Add fgets_unlocked. * libio/stdio.h: Add prototype for fgets_unlocked. * misc/getttyent.c (getttyent): Use fgets_unlocked instead of fgets. * misc/getusershell.c (initshells): Likewise. * misc/mntent_r.c (__getmntent_r): Explicitly lock stream. Use fgets_unlocked. * nss/nss_files/files-XXX.c (internal_getent): Likewise. * resolv/res_init.c (res_init): Likewise. * sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Convert a string representation of time to a time value.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
|
||||
|
||||
@@ -145,13 +145,13 @@ __getdate_r (const char *string, struct tm *tp)
|
||||
if (result && *result == '\0')
|
||||
break;
|
||||
}
|
||||
while (!feof (fp));
|
||||
while (!feof_unlocked (fp));
|
||||
|
||||
/* Free the buffer. */
|
||||
free (line);
|
||||
|
||||
/* Check for errors. */
|
||||
if (ferror (fp))
|
||||
if (ferror_unlocked (fp))
|
||||
{
|
||||
fclose (fp);
|
||||
return 5;
|
||||
|
Reference in New Issue
Block a user