configure: fix the check for unsigned time_t

Assign the time_t variable negative value and then check if it is
greater than zero, which will evaluate true for unsigned time_t but
false for signed time_t.
This commit is contained in:
Daniel Stenberg 2018-01-25 22:32:57 +01:00
parent 1c39128d97
commit 9a230ba419
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 1 deletions

View File

@ -3488,7 +3488,7 @@ AC_RUN_IFELSE([
AC_LANG_SOURCE([[
#include <time.h>
#include <limits.h>
time_t t = ULONG_MAX;
time_t t = -1;
return (t > 0);
]])] ,[
AC_MSG_RESULT([yes])