aboutsummaryrefslogtreecommitdiff
path: root/src/common/torint.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/torint.h')
-rw-r--r--src/common/torint.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/torint.h b/src/common/torint.h
index 75e45239c8..84f6b28dfa 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -235,6 +235,16 @@ typedef uint32_t uintptr_t;
#endif
#endif
+#ifndef TIME_MAX
+#if (SIZEOF_TIME_T == 4)
+#define TIME_MAX ((time_t)UINT32_MAX)
+#elif (SIZEOF_TIME_T == 8)
+#define TIME_MAX ((time_t)UINT64_MAX)
+#else
+#error "Can't define TIME_MAX"
+#endif
+#endif
+
/* Any size_t larger than this amount is likely to be an underflow. */
#define SIZE_T_CEILING (sizeof(char)<<(sizeof(size_t)*8 - 1))