diff options
author | Brent Cook <bcook@openbsd.org> | 2015-10-17 23:32:21 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-10-17 23:32:21 -0500 |
commit | c8918dd0be1bbadfcebfc6631bd63f3b3e83befd (patch) | |
tree | 86c209e6160b32fe04ea919c49134823b461f351 /configure.ac | |
parent | a45e38e962a30307dd2034c2c032bd76333ebd2c (diff) | |
download | portable-c8918dd0be1bbadfcebfc6631bd63f3b3e83befd.tar.gz portable-c8918dd0be1bbadfcebfc6631bd63f3b3e83befd.tar.bz2 portable-c8918dd0be1bbadfcebfc6631bd63f3b3e83befd.zip |
include warnings about small time_t
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 9 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 |