summary refs log tree commit diff
path: root/m4
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-04-18 17:20:54 -0400
committerJune McEnroe <june@causal.agency>2021-04-18 17:20:54 -0400
commitbe8eb3b67ce4718ca94287a68e0babc715afcd21 (patch)
tree5ca8bea74d0b5b03e7c6906fa9183b959d5c2b87 /m4
parentImport LibreSSL 3.3.1 (diff)
downloadlibretls-be8eb3b67ce4718ca94287a68e0babc715afcd21.tar.gz
libretls-be8eb3b67ce4718ca94287a68e0babc715afcd21.zip
Import LibreSSL 3.3.2
Diffstat (limited to 'm4')
-rw-r--r--m4/check-os-options.m418
1 files changed, 14 insertions, 4 deletions
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index c014efb..644bf71 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -123,10 +123,20 @@ char buf[1]; getentropy(buf, 1);
 	*) ;;
 esac
 
-AC_ARG_ENABLE([nc],
-	AS_HELP_STRING([--enable-nc], [Enable installing TLS-enabled nc(1)]))
-AM_CONDITIONAL([ENABLE_NC], [test "x$enable_nc" = xyes])
-AM_CONDITIONAL([BUILD_NC],  [test x$BUILD_NC = xyes -o "x$enable_nc" = xyes])
+# Check if time_t is sized correctly
+AC_CHECK_SIZEOF([time_t], [time.h])
+AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"])
+if test "$ac_cv_sizeof_time_t" = "4"; then
+    AC_DEFINE([SMALL_TIME_T])
+    echo " ** Warning, this system is unable to represent times past 2038"
+    echo " ** It will behave incorrectly when handling valid RFC5280 dates"
+
+    if test "$host_os" = "mingw32" ; then
+        echo " **"
+        echo " ** You can solve this by adjusting the build flags in your"
+        echo " ** mingw-w64 toolchain. Refer to README.windows for details."
+    fi
+fi
 
 AM_CONDITIONAL([HOST_AIX],     [test x$HOST_OS = xaix])
 AM_CONDITIONAL([HOST_CYGWIN],  [test x$HOST_OS = xcygwin])