]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* time/tzfile.c (tzfile_mtime): New variable. cvs/fedora-glibc-2_3_3-60
authorJakub Jelinek <jakub@redhat.com>
Wed, 29 Sep 2004 10:00:28 +0000 (10:00 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 29 Sep 2004 10:00:28 +0000 (10:00 +0000)
(__tzfile_read): Reread the file if mtime is different.

ChangeLog
time/tzfile.c

index 46dc4b994ed743620ce17b2779d9ba3592c8f3aa..cf39515d6d20547e365b7f53eebf2b2eb54a498f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-09-29  Jakub Jelinek  <jakub@redhat.com>
 
+       * time/tzfile.c (tzfile_mtime): New variable.
+       (__tzfile_read): Reread the file if mtime is different.
+
        * sysdeps/i386/fpu/s_fdim.S (__fdim): Handle +inf/+inf.
        * sysdeps/i386/fpu/s_fdimf.S (__fdimf): Likewise.
        * sysdeps/i386/fpu/s_fdiml.S (__fdiml): Likewise.
index 8c2756e7bbc56dfeacfd589c1123b01faaa55dfa..48c1e4d790e15643921b3f181fe8bc3686947893 100644 (file)
@@ -32,6 +32,7 @@
 int __use_tzfile;
 static dev_t tzfile_dev;
 static ino64_t tzfile_ino;
+static time_t tzfile_mtime;
 
 struct ttinfo
   {
@@ -161,7 +162,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
       fclose (f);
       goto ret_free_transitions;
     }
-  if (was_using_tzfile && tzfile_ino == st.st_ino && tzfile_dev == st.st_dev)
+  if (was_using_tzfile && tzfile_ino == st.st_ino && tzfile_dev == st.st_dev
+      && tzfile_mtime == st.st_mtime)
     {
       /* It's the same file.  No further work needed.  */
       fclose (f);
@@ -172,9 +174,10 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
   free ((void *) transitions);
   transitions = NULL;
 
-  /* Remember the inode and device number.  */
+  /* Remember the inode and device number and modification time.  */
   tzfile_dev = st.st_dev;
   tzfile_ino = st.st_ino;
+  tzfile_mtime = st.st_mtime;
 
   /* No threads reading this stream.  */
   __fsetlocking (f, FSETLOCKING_BYCALLER);