configure: fix HAVE_TIME_T_UNSIGNED check

The syntax was incorrect (need a proper main body), and the test
condition was wrong (resulting in a signed `time_t` detected as
unsigned).

Closes #11825
This commit is contained in:
Benoit Pierre 2023-09-10 06:26:14 +02:00 committed by Daniel Stenberg
parent fe599ff090
commit 3e39cda4d6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -3569,8 +3569,10 @@ CURL_RUN_IFELSE(
[
#include <time.h>
#include <limits.h>
time_t t = -1;
return (t > 0);
int main(void) {
time_t t = -1;
return (t < 0);
}
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])