From: Lennart Poettering Date: Wed, 3 Feb 2016 20:05:59 +0000 (+0100) Subject: util: add check that makes sure time_t and TIME_T_MAX work the way we assume they do X-Git-Tag: v229.1~1^2~30 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=5986f533c144a8142b5e047223e7a6f85c20b98b util: add check that makes sure time_t and TIME_T_MAX work the way we assume they do --- diff --git a/src/basic/time-util.h b/src/basic/time-util.h index 3d6dbff35..61f263bae 100644 --- a/src/basic/time-util.h +++ b/src/basic/time-util.h @@ -69,7 +69,7 @@ typedef struct dual_timestamp { #define FORMAT_TIMESTAMP_RELATIVE_MAX 256 #define FORMAT_TIMESPAN_MAX 64 -#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) +#define TIME_T_MAX (time_t)((UINTMAX_C(1) << ((sizeof(time_t) << 3) - 1)) - 1) #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0ULL, 0ULL })