summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-07-12 18:00:05 +1000
committerDarren Tucker <dtucker@dtucker.net>2021-07-12 18:21:26 +1000
commitf5fc6a4c3404bbf65c21ca6361853b33d78aa87e (patch)
tree44eeb4c81e03705618760e91840e77b5b117ae9f /configure.ac
parentfd2d06ae4442820429d634c0a8bae11c8e40c174 (diff)
Add configure-time detection for SSH_TIME_T_MAX.
Should fix printing cert times exceeding INT_MAX (bz#3329) on platforms were time_t is a long long. The limit used is for the signed type, so if some system has a 32bit unsigned time_t then the lower limit will still be imposed and we would need to add some way to detect this. Anyone using an unsigned 64bit can let us know when it starts being a problem.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 83719193..e728e323 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3664,7 +3664,7 @@ if test ! -z "$SONY" ; then
LIBS="$LIBS -liberty";
fi
-# Check for long long datatypes
+# Check for long long datatypes
AC_CHECK_TYPES([long long, unsigned long long, long double])
# Check datatype sizes
@@ -3672,6 +3672,16 @@ AC_CHECK_SIZEOF([short int])
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long int])
AC_CHECK_SIZEOF([long long int])
+AC_CHECK_SIZEOF([time_t], [], [[
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_TIME_H
+ # include <time.h>
+ #endif
+ ]]
+)
# Sanity check long long for some platforms (AIX)
if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then