Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2004-09-29  Jakub Jelinek  <jakub@redhat.com>

	* time/tzfile.c (tzfile_mtime): New variable.
	(__tzfile_read): Reread the file if mtime is different.

2004-09-28  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/alpha/fpu/bits/mathinline.h (__fdimf, __fdim, fdimf, fdim):
	Handle +inf/+inf.
	* sysdeps/powerpc/fpu/bits/mathinline.h (fdim, fdimf): Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h (fdim, fdimf): Likewise.
  • Loading branch information
Ulrich Drepper committed Sep 30, 2004
1 parent af38d7c commit 8930fcf
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2004-09-29 Jakub Jelinek <jakub@redhat.com>

* time/tzfile.c (tzfile_mtime): New variable.
(__tzfile_read): Reread the file if mtime is different.

2004-09-28 Jakub Jelinek <jakub@redhat.com>

* sysdeps/alpha/fpu/bits/mathinline.h (__fdimf, __fdim, fdimf, fdim):
Handle +inf/+inf.
* sysdeps/powerpc/fpu/bits/mathinline.h (fdim, fdimf): Likewise.
* sysdeps/sparc/fpu/bits/mathinline.h (fdim, fdimf): Likewise.

2004-09-29 Ulrich Drepper <drepper@redhat.com>

* nscd/nscd_gethst_r.c (nscd_gethst_r): Use correct constant for
Expand Down
8 changes: 4 additions & 4 deletions sysdeps/alpha/fpu/bits/mathinline.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,25 +149,25 @@ __MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); }
__MATH_INLINE float
__NTH (__fdimf (float __x, float __y))
{
return __x < __y ? 0.0f : __x - __y;
return __x <= __y ? 0.0f : __x - __y;
}

__MATH_INLINE float
__NTH (fdimf (float __x, float __y))
{
return __x < __y ? 0.0f : __x - __y;
return __x <= __y ? 0.0f : __x - __y;
}

__MATH_INLINE double
__NTH (__fdim (double __x, double __y))
{
return __x < __y ? 0.0 : __x - __y;
return __x <= __y ? 0.0 : __x - __y;
}

__MATH_INLINE double
__NTH (fdim (double __x, double __y))
{
return __x < __y ? 0.0 : __x - __y;
return __x <= __y ? 0.0 : __x - __y;
}

/* Test for negative number. Used in the signbit() macro. */
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/powerpc/fpu/bits/mathinline.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW;
__MATH_INLINE double
__NTH (fdim (double __x, double __y))
{
return __x < __y ? 0 : __x - __y;
return __x <= __y ? 0 : __x - __y;
}

__MATH_INLINE float fdimf (float __x, float __y) __THROW;
__MATH_INLINE float
__NTH (fdimf (float __x, float __y))
{
return __x < __y ? 0 : __x - __y;
return __x <= __y ? 0 : __x - __y;
}

#endif /* __USE_ISOC99 */
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/sparc/fpu/bits/mathinline.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW;
__MATH_INLINE double
fdim (double __x, double __y) __THROW
{
return __x < __y ? 0 : __x - __y;
return __x <= __y ? 0 : __x - __y;
}

__MATH_INLINE float fdimf (float __x, float __y) __THROW;
__MATH_INLINE float
fdimf (float __x, float __y) __THROW
{
return __x < __y ? 0 : __x - __y;
return __x <= __y ? 0 : __x - __y;
}

# endif /* !__NO_MATH_INLINES */
Expand Down
7 changes: 5 additions & 2 deletions time/tzfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
int __use_tzfile;
static dev_t tzfile_dev;
static ino64_t tzfile_ino;
static time_t tzfile_mtime;

struct ttinfo
{
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 8930fcf

Please sign in to comment.