util: add check that makes sure time_t and TIME_T_MAX work the way we assume they do

This commit is contained in:
Lennart Poettering
2016-02-03 23:58:25 +01:00
parent 59e73c5b10
commit 2d60169dd6
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -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 })