1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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

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])