include warnings about small time_t
This commit is contained in:
parent
a45e38e962
commit
c8918dd0be
12
configure.ac
12
configure.ac
@ -48,9 +48,6 @@ AM_CONDITIONAL([BUILD_CERTHASH], [test "x$ac_cv_func_symlink" = xyes])
|
||||
# Check if funopen exists
|
||||
AC_CHECK_FUNC([funopen])
|
||||
|
||||
# Check if time_t is sized correctly
|
||||
AC_CHECK_SIZEOF([time_t], [time.h])
|
||||
|
||||
CHECK_LIBC_COMPAT
|
||||
CHECK_SYSCALL_COMPAT
|
||||
CHECK_CRYPTO_COMPAT
|
||||
@ -117,6 +114,9 @@ AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
|
||||
AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],
|
||||
[test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
||||
|
||||
# Check if time_t is sized correctly
|
||||
AC_CHECK_SIZEOF([time_t], [time.h])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
include/Makefile
|
||||
@ -135,4 +135,10 @@ AC_CONFIG_FILES([
|
||||
openssl.pc
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"])
|
||||
if test "$ac_cv_sizeof_time_t" = "4"; then
|
||||
echo " ** Warning, this system is unable to represent times past 2038"
|
||||
echo " ** It will behave incorrectly when handling valid RFC5280 dates"
|
||||
fi
|
||||
|
||||
AC_OUTPUT
|
||||
|
@ -259,9 +259,15 @@ check_PROGRAMS += rc4test
|
||||
rc4test_SOURCES = rc4test.c
|
||||
|
||||
# rfc5280time
|
||||
if SMALL_TIME_T
|
||||
TESTS += rfc5280time_too_small
|
||||
check_PROGRAMS += rfc5280time_too_small
|
||||
rfc5280time_too_small_SOURCES = rfc5280time.c
|
||||
else
|
||||
TESTS += rfc5280time
|
||||
check_PROGRAMS += rfc5280time
|
||||
rfc5280time_SOURCES = rfc5280time.c
|
||||
endif
|
||||
|
||||
# rmdtest
|
||||
TESTS += rmdtest
|
||||
|
Loading…
x
Reference in New Issue
Block a user