Fixed possible preprocessor errors

This commit is contained in:
Evgeny Grin (Karlson2k)
2021-09-02 10:45:38 +03:00
parent 0920a1f908
commit aaab73802c
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -1102,6 +1102,7 @@ static struct timeval test_var;
AC_DEFINE_UNQUOTED([SIZEOF_STRUCT_TIMEVAL_TV_SEC], [$mhd_cv_size_timeval_tv_sec],
[The size of `tv_sec' member of `struct timeval', as computed by sizeof])
AC_CHECK_SIZEOF([uint64_t], [], [[#include <stdint.h>]])
AC_CHECK_SIZEOF([unsigned int], [], [[#include <stdint.h>]])
AC_CHECK_HEADERS([dlfcn.h],[have_tlsplugin=yes],[have_tlsplugin=no], [AC_INCLUDES_DEFAULT])
AM_CONDITIONAL([MHD_HAVE_TLS_PLUGIN], [[test "x$have_tlsplugin" = xyes]])
+2 -2
View File
@@ -4782,7 +4782,7 @@ MHD_set_connection_option (struct MHD_Connection *connection,
connection->connection_timeout_ms = va_arg (ap,
unsigned int);
va_end (ap);
#if (0 == (UINT64_MAX + 0)) || ((UINT_MAX + 0) >= (UINT64_MAX + 0))
#if (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT
if ((UINT64_MAX / 2000 - 1) < connection->connection_timeout_ms)
{
#ifdef HAVE_MESSAGES
@@ -4796,7 +4796,7 @@ MHD_set_connection_option (struct MHD_Connection *connection,
connection->connection_timeout_ms = UINT64_MAX / 2000 - 1;
}
else
#endif /* UINTMAX_MAX >= UINT64_MAX */
#endif /* (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT */
connection->connection_timeout_ms *= 1000;
if ( (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
(! connection->suspended) )
+2 -2
View File
@@ -5624,7 +5624,7 @@ parse_options_va (struct MHD_Daemon *daemon,
case MHD_OPTION_CONNECTION_TIMEOUT:
uv = va_arg (ap,
unsigned int);
#if (0 == (UINT64_MAX + 0)) || ((UINT_MAX + 0) >= (UINT64_MAX + 0))
#if (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT
if ((UINT64_MAX / 2000 - 1) < uv)
{
#ifdef HAVE_MESSAGES
@@ -5638,7 +5638,7 @@ parse_options_va (struct MHD_Daemon *daemon,
daemon->connection_timeout_ms = UINT64_MAX / 2000 - 1;
}
else
#endif /* UINTMAX_MAX >= UINT64_MAX */
#endif /* (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT */
daemon->connection_timeout_ms = uv * 1000;
break;
case MHD_OPTION_NOTIFY_COMPLETED: