about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-17 08:32:35 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-17 08:32:35 +0000
commit2706ee382341eb1c2e5f96c7d90f346696dbd0d8 (patch)
treec29690519bcb43604d9e0affa936aa7a2798660a /time
parent23700036397721389b90ac41571d68df2f26ad67 (diff)
downloadglibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar.gz
glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar.xz
glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.zip
Update.
2001-07-17  Ulrich Drepper  <drepper@redhat.com>

	* inet/rcmd.c (iruserfopen): Disable implicit locking for the stream.
	* inet/ruserpass.c (ruserpass): Likewise.
	* nss/nsswitch.c (nss_parse_file): Likewise.
	* resolv/res_hconf.c (_res_hconf_init): Likewise.
	* resolv/res_init.c (__res_vinit): Likewise.
	* gmon/bb_exit_func.c (__bb_exit_func): Likewise.
	* misc/getpass.c (getpass): Likewise.
	* misc/getusershell.c (initshells): Likewise.
	* misc/getttyent.c (setttyent): Likewise.
	* misc/mntent_r.c (__setmntent): Likewise.
	* time/getdate.c (__getdate_r): Likewise.
	* time/tzfile.c (__tzfile_read): Likewise.
	* iconv/gconv_conf.c (read_conf_file): Likewise.
	* intl/localealias.c (read_alias_file): Disable implicit locking
	for the stream.  Use _unlocked functions for glibc.
	* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Disable
	implicit locking for the stream.
	(__get_nprocs_conf): Likewise.
	(phys_pages_info): Likewise.
Diffstat (limited to 'time')
-rw-r--r--time/getdate.c6
-rw-r--r--time/tzfile.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/time/getdate.c b/time/getdate.c
index ad07c8ddca..8ed293cd5f 100644
--- a/time/getdate.c
+++ b/time/getdate.c
@@ -1,5 +1,5 @@
 /* Convert a string representation of time to a time value.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
 
@@ -20,6 +20,7 @@
 
 #include <limits.h>
 #include <stdio.h>
+#include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
@@ -132,6 +133,9 @@ __getdate_r (const char *string, struct tm *tp)
   if (fp == NULL)
     return 2;
 
+  /* No threads reading this stream.  */
+  __fsetlocking (fp, FSETLOCKING_BYCALLER);
+
   line = NULL;
   len = 0;
   do
diff --git a/time/tzfile.c b/time/tzfile.c
index d99707e71e..5c2b28d582 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1995-2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
 #include <assert.h>
 #include <limits.h>
 #include <stdio.h>
+#include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
@@ -150,6 +151,9 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
   if (f == NULL)
     return;
 
+  /* No threads reading this stream.  */
+  __fsetlocking (f, FSETLOCKING_BYCALLER);
+
   if (fread_unlocked ((void *) &tzhead, sizeof (tzhead), 1, f) != 1)
     goto lose;