diff options
Diffstat (limited to 'ChangeLog')
| -rw-r--r-- | ChangeLog | 99 |
1 files changed, 99 insertions, 0 deletions
| @@ -1,3 +1,102 @@ | |||
| 1 | 2011-01-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | gnulib: import mktime and move-if-change fixes from gnulib | ||
| 4 | |||
| 5 | * configure: Regenerate from the following. | ||
| 6 | |||
| 7 | 2011-01-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 8 | |||
| 9 | mktime: clarify long_int width checking | ||
| 10 | * lib/mktime.c (long_int_is_wide_enough): Move this assertion to | ||
| 11 | the top level, to make it clearer that the assumption about | ||
| 12 | long_int width is being checked. See | ||
| 13 | <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00554.html>. | ||
| 14 | |||
| 15 | 2011-01-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | TYPE_MAXIMUM: avoid theoretically undefined behavior | ||
| 18 | * lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a | ||
| 19 | negative number, which the C Standard says has undefined behavior. | ||
| 20 | In practice this is not a problem, but might as well do it by the book. | ||
| 21 | Reported by Rich Felker and Eric Blake; see | ||
| 22 | <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00493.html>. | ||
| 23 | * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise. | ||
| 24 | * lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others. | ||
| 25 | |||
| 26 | mktime: #undef mktime before #defining it | ||
| 27 | * lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it. | ||
| 28 | |||
| 29 | mktime: systematically normalize tm_isdst comparisons | ||
| 30 | * lib/mktime.c (isdst_differ): New function. | ||
| 31 | (__mktime_internal): Use it systematically for all isdst comparisons. | ||
| 32 | This completes the fix for libc BZ #6723, and removes the need for | ||
| 33 | normalizing tm_isdst. See | ||
| 34 | <http://sourceware.org/bugzilla/show_bug.cgi?id=6723> | ||
| 35 | (not_equal_tm) [DEBUG]: Use isdst_differ here, too. | ||
| 36 | |||
| 37 | mktime: fix some integer overflow issues and sidestep the rest | ||
| 38 | |||
| 39 | This was prompted by a bug report by Benjamin Lindner for MinGW | ||
| 40 | <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00472.html>. | ||
| 41 | His bug is due to signed integer overflow (0 - INT_MIN), and I | ||
| 42 | I scanned through mktime.c looking for other integer overflow | ||
| 43 | problems, fixing all the bugs I found. | ||
| 44 | |||
| 45 | Although the C Standard says the resulting code is still not safe | ||
| 46 | in the presence of integer overflow, in practice it should be good | ||
| 47 | enough for all real-world two's-complement implementations, except | ||
| 48 | for debugging environments that deliberately trap on integer | ||
| 49 | overflow (e.g., gcc -ftrapv). | ||
| 50 | |||
| 51 | * lib/mktime.c (WRAPV): New macro. | ||
| 52 | (SHR): Also check that long_int and time_t shift right in the | ||
| 53 | usual way, before using the fast-but-unportable method. | ||
| 54 | (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer | ||
| 55 | used. The code already assumed two's complement, so there's | ||
| 56 | no need to test for alternatives. All uses removed. | ||
| 57 | (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by | ||
| 58 | the C standard. Problem reported by Rich Felker in | ||
| 59 | <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00488.html>. | ||
| 60 | (twos_complement_arithmetic): Also check long_int and time_t. | ||
| 61 | (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions. | ||
| 62 | (guess_time_tm, ranged_convert, __mktime_internal): Use them. | ||
| 63 | (__mktime_internal): Avoid integer overflow with unary subtraction | ||
| 64 | in two instances where -1 - X is an adequate replacement for -X, | ||
| 65 | since the calculations are approximate. | ||
| 66 | |||
| 67 | 2011-01-29 Eric Blake <eblake@redhat.com> | ||
| 68 | |||
| 69 | mktime: avoid infinite loop | ||
| 70 | * m4/mktime.m4 (AC_FUNC_MKTIME): Avoid overflow on possibly-signed | ||
| 71 | type; behavior is still undefined but portable to all known targets. | ||
| 72 | Reported by Rich Felker. | ||
| 73 | |||
| 74 | 2011-01-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 75 | |||
| 76 | mktime: avoid problems on NetBSD 5 / i386 | ||
| 77 | * lib/mktime.c (long_int): New type. This works around a problem | ||
| 78 | on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits | ||
| 79 | but time_t is 64 bits, and where I expect the existing code is | ||
| 80 | wrong in some cases. | ||
| 81 | (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it. | ||
| 82 | (ydhms_diff): Bring back the compile-time check for wide-enough | ||
| 83 | year and yday. | ||
| 84 | |||
| 85 | mktime: fix misspelling in comment | ||
| 86 | * lib/mktime.c (__mktime_internal): Fix misspelling in comment. | ||
| 87 | This merges all recent glibc changes of importance. | ||
| 88 | |||
| 89 | 2011-01-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | ||
| 90 | |||
| 91 | move-if-change: cope with concurrent mv of identical file. | ||
| 92 | * move-if-change (CMPPROG): Accept environment | ||
| 93 | variable as an override for `cmp'. | ||
| 94 | (usage): Document CMPPROG. | ||
| 95 | Adjust comparison to drop stdout. Cope with failure of mv if | ||
| 96 | the target file exists and is identical to the source, for | ||
| 97 | parallel builds. | ||
| 98 | Report from H.J. Lu against binutils in PR binutils/12283. | ||
| 99 | |||
| 1 | 2011-01-29 Eli Zaretskii <eliz@gnu.org> | 100 | 2011-01-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 101 | ||
| 3 | * lib/makefile.w32-in: | 102 | * lib/makefile.w32-in: |