summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-11-11 22:31:17 +0000
committerRoland McGrath <roland@gnu.org>2004-11-11 22:31:17 +0000
commit29311370cd23623cc227a67c54ae3bdd0f7d7058 (patch)
treeceb71df3dc632ec9ace06cd8ed9d75c9463e55e5 /ChangeLog
parent37b1a1540170d8154435099d50da5b34a56bdbf1 (diff)
[BZ #535]
2004-11-09 Paul Eggert <eggert@cs.ucla.edu. [BZ #535] * time/difftime.c: Fix a double-rounding bug on hosts with 64-bit time_t and long double being IEEE double. Also, port to more valid C99 hosts, even those that have padding bits. Don't include <values.h> since it is marked as an obsolescent interface. Include <limits.h>, <float.h>, and <stdint.h> instead. (TYPE_BITS, TYPE_FLOATING, TYPE_SIGNED): New macros. (subtract): New static function, that works correctly without double-rounding, even on hosts with 64-bit time_t. Also cater to hosts with padding bits. (__difftime): Use it. Use DBL_MANT_DIG and LDBL_MANT_DIG to determine whether floating types are wide enough: the old test (which used sizeof) could in theory report the wrong results on hosts with padding bits in floating-point values.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog17
1 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c89325aaee..3bf7a3e31c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2004-11-09 Paul Eggert <eggert@cs.ucla.edu.
+
+ [BZ #535]
+ * time/difftime.c: Fix a double-rounding bug on hosts with
+ 64-bit time_t and long double being IEEE double. Also, port
+ to more valid C99 hosts, even those that have padding bits.
+ Don't include <values.h> since it is marked as an obsolescent
+ interface. Include <limits.h>, <float.h>, and <stdint.h> instead.
+ (TYPE_BITS, TYPE_FLOATING, TYPE_SIGNED): New macros.
+ (subtract): New static function, that works correctly without
+ double-rounding, even on hosts with 64-bit time_t. Also cater
+ to hosts with padding bits.
+ (__difftime): Use it. Use DBL_MANT_DIG and LDBL_MANT_DIG to
+ determine whether floating types are wide enough: the old
+ test (which used sizeof) could in theory report the wrong results
+ on hosts with padding bits in floating-point values.
+
2004-11-11 Simon Josefsson <jas@extundo.com>
[BZ #542]