]> Savannah Git Hosting - gnulib.git/commit
mktime: improve integer overflow checking
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2016 17:53:56 +0000 (10:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2016 17:56:11 +0000 (10:56 -0700)
commit464ba3489f78bfd1d30812dc3739a5b4c4655264
tree1efbb6402122069779b0fbc877105bc954a6c28d
parentb9e3fb39a84d683772dca7d3f82872915aa550fb
mktime: improve integer overflow checking

* lib/mktime.c: Include stdbool.h, intprops.h, verify.h.
(WRAPV): Remove; no longer needed.
(verify): Remove.  Replace all uses with call to verify.h 'verify'.
(TYPE_IS_INTEGER, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
Remove.  Use intprops.h defns instead.
(leapyear, isdst_differ, time_t_add_ok, time_t_int_ok):
Use bool for Boolean, for clarity.
(time_t_add_ok, time_t_int_add_ok): Use INT_ADD_WRAPV to
detect integer overflow.
* modules/mktime (Depends-on): Add intprops, stdbool, verify.
ChangeLog
lib/mktime.c
modules/mktime