diff options
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | tests/Makefile.am | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e97991d..148ca64 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -48,9 +48,6 @@ AM_CONDITIONAL([BUILD_CERTHASH], [test "x$ac_cv_func_symlink" = xyes]) | |||
48 | # Check if funopen exists | 48 | # Check if funopen exists |
49 | AC_CHECK_FUNC([funopen]) | 49 | AC_CHECK_FUNC([funopen]) |
50 | 50 | ||
51 | # Check if time_t is sized correctly | ||
52 | AC_CHECK_SIZEOF([time_t], [time.h]) | ||
53 | |||
54 | CHECK_LIBC_COMPAT | 51 | CHECK_LIBC_COMPAT |
55 | CHECK_SYSCALL_COMPAT | 52 | CHECK_SYSCALL_COMPAT |
56 | CHECK_CRYPTO_COMPAT | 53 | CHECK_CRYPTO_COMPAT |
@@ -117,6 +114,9 @@ AM_CONDITIONAL([HOST_ASM_ELF_X86_64], | |||
117 | AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], | 114 | AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], |
118 | [test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) | 115 | [test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) |
119 | 116 | ||
117 | # Check if time_t is sized correctly | ||
118 | AC_CHECK_SIZEOF([time_t], [time.h]) | ||
119 | |||
120 | AC_CONFIG_FILES([ | 120 | AC_CONFIG_FILES([ |
121 | Makefile | 121 | Makefile |
122 | include/Makefile | 122 | include/Makefile |
@@ -135,4 +135,10 @@ AC_CONFIG_FILES([ | |||
135 | openssl.pc | 135 | openssl.pc |
136 | ]) | 136 | ]) |
137 | 137 | ||
138 | AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"]) | ||
139 | if test "$ac_cv_sizeof_time_t" = "4"; then | ||
140 | echo " ** Warning, this system is unable to represent times past 2038" | ||
141 | echo " ** It will behave incorrectly when handling valid RFC5280 dates" | ||
142 | fi | ||
143 | |||
138 | AC_OUTPUT | 144 | AC_OUTPUT |
diff --git a/tests/Makefile.am b/tests/Makefile.am index c56b1ea..6bf3118 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -259,9 +259,15 @@ check_PROGRAMS += rc4test | |||
259 | rc4test_SOURCES = rc4test.c | 259 | rc4test_SOURCES = rc4test.c |
260 | 260 | ||
261 | # rfc5280time | 261 | # rfc5280time |
262 | if SMALL_TIME_T | ||
263 | TESTS += rfc5280time_too_small | ||
264 | check_PROGRAMS += rfc5280time_too_small | ||
265 | rfc5280time_too_small_SOURCES = rfc5280time.c | ||
266 | else | ||
262 | TESTS += rfc5280time | 267 | TESTS += rfc5280time |
263 | check_PROGRAMS += rfc5280time | 268 | check_PROGRAMS += rfc5280time |
264 | rfc5280time_SOURCES = rfc5280time.c | 269 | rfc5280time_SOURCES = rfc5280time.c |
270 | endif | ||
265 | 271 | ||
266 | # rmdtest | 272 | # rmdtest |
267 | TESTS += rmdtest | 273 | TESTS += rmdtest |