aboutsummaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-03-16 03:04:42 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-05-23 14:36:24 -0700
commit72a22e596cb1359fc7e05de6d5de6f35f3eb5785 (patch)
tree55a16758335e3bf330007f6bc626b98d6b6e32b0 /time
parent68605433483b08e8a31541d833bf92ff3ecad75c (diff)
downloadglibc-72a22e596cb1359fc7e05de6d5de6f35f3eb5785.tar
glibc-72a22e596cb1359fc7e05de6d5de6f35f3eb5785.tar.gz
glibc-72a22e596cb1359fc7e05de6d5de6f35f3eb5785.tar.bz2
glibc-72a22e596cb1359fc7e05de6d5de6f35f3eb5785.zip
mktime: merge another wrapv change from gnulib
* time/mktime.c (TYPE_MAXIMUM): Rework slightly to avoid diagnostics from some compilers.
Diffstat (limited to 'time')
-rw-r--r--time/mktime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/time/mktime.c b/time/mktime.c
index 652a0f2d4a..61b230833e 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -121,7 +121,7 @@ verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2);
#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)