about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-05 12:05:16 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-05 12:05:16 +0000
commit71412a8c76fe28a62a2acf243f5ae4e91ddf632e (patch)
tree9da097ba8307f2f6de872968566071cc4eac3b1f /sysdeps
parent6777b467cec0f1bee82bbd5098bcfa006268fd9c (diff)
downloadglibc-71412a8c76fe28a62a2acf243f5ae4e91ddf632e.tar.gz
glibc-71412a8c76fe28a62a2acf243f5ae4e91ddf632e.tar.xz
glibc-71412a8c76fe28a62a2acf243f5ae4e91ddf632e.zip
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.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index 26f8179afe..58f55ac99c 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -94,7 +94,7 @@ __get_nprocs ()
 	     string "processor".  We don't have to fear extremely long
 	     lines since the kernel will not generate them.  8192
 	     bytes are really enough.  */
-	  while (fgets (buffer, sizeof buffer, fp) != NULL)
+	  while (fgets_unlocked (buffer, sizeof buffer, fp) != NULL)
 	    if (strncmp (buffer, "processor", 9) == 0)
 	      ++result;
 
@@ -141,7 +141,7 @@ phys_pages_info (const char *format)
 	     string "processor".  We don't have to fear extremely long
 	     lines since the kernel will not generate them.  8192
 	     bytes are really enough.  */
-	  while (fgets (buffer, sizeof buffer, fp) != NULL)
+	  while (fgets_unlocked (buffer, sizeof buffer, fp) != NULL)
 	    if (sscanf (buffer, format, &result) == 1)
 	      {
 		result /= (__getpagesize () / 1024);