set SMALL_TIME_T when sizeof time_t == 4

This commit is contained in:
Brent Cook 2017-08-14 12:15:00 -05:00
parent 4916f940c8
commit 7dc68c82bc
2 changed files with 2 additions and 0 deletions

View File

@ -306,6 +306,7 @@ endif()
check_type_size(time_t SIZEOF_TIME_T)
if(SIZEOF_TIME_T STREQUAL "4")
set(SMALL_TIME_T true)
add_definitions(-DSMALL_TIME_T)
message(WARNING " ** Warning, this system is unable to represent times past 2038\n"
" ** It will behave incorrectly when handling valid RFC5280 dates")
endif()

View File

@ -134,6 +134,7 @@ AC_CONFIG_FILES([
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"