* time/mktime.c (TYPE_MAXIMUM): Rework slightly to avoid diagnostics
from some compilers.
2012-05-23 Paul Eggert <eggert@cs.ucla.edu>
+ mktime: merge another wrapv change from gnulib
+ * time/mktime.c (TYPE_MAXIMUM): Rework slightly to avoid diagnostics
+ from some compilers.
+
mktime: remove incorrect attempt at unusual arithmetics
* time/mktime.c (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove.
The code didn't really work on such machines anyway.
#define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
- : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
#ifndef TIME_T_MIN
# define TIME_T_MIN TYPE_MINIMUM (time_t)