aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-12-06 11:27:30 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-12-06 21:38:58 +0300
commit9f0d5f6eb158a3908249084b7dd59e354b74bcde (patch)
tree31aec2aebf11a04923dc0ae967e6f45ea27623cc
parentc153aef67538846ca07dff460a4915efe0ec14ce (diff)
downloadlibmicrohttpd-9f0d5f6eb158a3908249084b7dd59e354b74bcde.tar.gz
libmicrohttpd-9f0d5f6eb158a3908249084b7dd59e354b74bcde.zip
configure: fixed compiler warning when checking
-rw-r--r--configure.ac23
1 files changed, 14 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 5d4696b4..35436e7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,6 +341,8 @@ choke me
341 c = sumfn(a, b); 341 c = sumfn(a, b);
342 else 342 else
343 c = 0 - sumfn(a, b); 343 c = 0 - sumfn(a, b);
344 if (c)
345 return 0;
344 ]]) 346 ]])
345 ], 347 ],
346 [[ inln_prfx="$inln_prfx_chk" ]]) 348 [[ inln_prfx="$inln_prfx_chk" ]])
@@ -882,7 +884,7 @@ AC_INCLUDES_DEFAULT
882#ifdef HAVE_PTHREAD_NP_H 884#ifdef HAVE_PTHREAD_NP_H
883#include <pthread_np.h> 885#include <pthread_np.h>
884#endif 886#endif
885]], [[int res = pthread_setname_np(pthread_self(), "name", 0);]])], 887]], [[int res = pthread_setname_np(pthread_self(), "name", 0); if (res) return res;]])],
886 [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_NETBSD]], [[1]], [Define if you have NetBSD form (or OSF1 form) of pthread_setname_np(3) function.]) 888 [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_NETBSD]], [[1]], [Define if you have NetBSD form (or OSF1 form) of pthread_setname_np(3) function.])
887 HAVE_THREAD_NAME_FUNC="yes" 889 HAVE_THREAD_NAME_FUNC="yes"
888 AC_MSG_RESULT([[yes]])], 890 AC_MSG_RESULT([[yes]])],
@@ -898,7 +900,7 @@ AC_INCLUDES_DEFAULT
898#ifdef HAVE_PTHREAD_NP_H 900#ifdef HAVE_PTHREAD_NP_H
899#include <pthread_np.h> 901#include <pthread_np.h>
900#endif 902#endif
901]], [[int res = pthread_setname_np(pthread_self(), "name");]])], 903]], [[int res = pthread_setname_np(pthread_self(), "name"); if (res) return res;]])],
902 [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_GNU]], [[1]], [Define if you have GNU/Linux form of pthread_setname_np(3) function.]) 904 [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_GNU]], [[1]], [Define if you have GNU/Linux form of pthread_setname_np(3) function.])
903 HAVE_THREAD_NAME_FUNC="yes" 905 HAVE_THREAD_NAME_FUNC="yes"
904 AC_MSG_RESULT([[yes]])], 906 AC_MSG_RESULT([[yes]])],
@@ -914,7 +916,7 @@ AC_INCLUDES_DEFAULT
914#ifdef HAVE_PTHREAD_NP_H 916#ifdef HAVE_PTHREAD_NP_H
915#include <pthread_np.h> 917#include <pthread_np.h>
916#endif 918#endif
917]], [[int res = pthread_setname_np("name");]])], 919]], [[int res = pthread_setname_np("name"); if (res) return res;]])],
918 [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_DARWIN]], [[1]], [Define if you have Darwin form of pthread_setname_np(3) function.]) 920 [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_DARWIN]], [[1]], [Define if you have Darwin form of pthread_setname_np(3) function.])
919 HAVE_THREAD_NAME_FUNC="yes" 921 HAVE_THREAD_NAME_FUNC="yes"
920 AC_MSG_RESULT([[yes]])], 922 AC_MSG_RESULT([[yes]])],
@@ -966,9 +968,9 @@ choke me
966#if defined(MHD_USE_POSIX_THREADS) && (defined(HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD) || defined(HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI) || \ 968#if defined(MHD_USE_POSIX_THREADS) && (defined(HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD) || defined(HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI) || \
967 defined(HAVE_PTHREAD_SETNAME_NP_GNU) || defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) || defined(HAVE_PTHREAD_SETNAME_NP_DARWIN) || \ 969 defined(HAVE_PTHREAD_SETNAME_NP_GNU) || defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) || defined(HAVE_PTHREAD_SETNAME_NP_DARWIN) || \
968 defined(HAVE_PTHREAD_SETNAME_NP_NETBSD) ) 970 defined(HAVE_PTHREAD_SETNAME_NP_NETBSD) )
969int a = 1; 971(void) 0; /* no-op */
970#elif defined(MHD_USE_W32_THREADS) && defined(_MSC_FULL_VER) 972#elif defined(MHD_USE_W32_THREADS) && defined(_MSC_FULL_VER)
971int b = 2; 973(void) 0; /* no-op */
972#else 974#else
973#error No thread name function is available. 975#error No thread name function is available.
974choke me 976choke me
@@ -1211,7 +1213,7 @@ AC_CACHE_CHECK([size of tv_sec member of struct timeval], [mhd_cv_size_timeval_t
1211#if HAVE_SYS_TYPES_H 1213#if HAVE_SYS_TYPES_H
1212#include <sys/types.h> 1214#include <sys/types.h>
1213#endif /* HAVE_SYS_TYPES_H */ 1215#endif /* HAVE_SYS_TYPES_H */
1214static struct timeval test_var; 1216struct timeval test_var;
1215 ]], 1217 ]],
1216 [ 1218 [
1217 # The size is used only to exclude additional checks/comparison in code 1219 # The size is used only to exclude additional checks/comparison in code
@@ -1563,7 +1565,9 @@ AS_IF([[test "x$enable_itc" = "xeventfd" || test "x$enable_itc" = "xauto"]], [
1563 AC_LINK_IFELSE([ 1565 AC_LINK_IFELSE([
1564 AC_LANG_PROGRAM([[ 1566 AC_LANG_PROGRAM([[
1565#include <sys/eventfd.h> 1567#include <sys/eventfd.h>
1566 ]], [[int ef = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK) 1568 ]], [[
1569 int ef = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
1570 if (ef) return ef - 1;
1567 ]]) 1571 ]])
1568 ], [[mhd_cv_eventfd_usable='yes']], [[mhd_cv_eventfd_usable='no']]) 1572 ], [[mhd_cv_eventfd_usable='yes']], [[mhd_cv_eventfd_usable='no']])
1569 ]) 1573 ])
@@ -1923,7 +1927,8 @@ LIBS="$LIBS -lmagic"
1923AC_MSG_CHECKING([[for suitable libmagic]]) 1927AC_MSG_CHECKING([[for suitable libmagic]])
1924AC_LINK_IFELSE( 1928AC_LINK_IFELSE(
1925 [AC_LANG_PROGRAM( 1929 [AC_LANG_PROGRAM(
1926 [[ 1930 [AC_INCLUDES_DEFAULT
1931 [
1927#include <magic.h> 1932#include <magic.h>
1928 ]], 1933 ]],
1929 [[ 1934 [[
@@ -2579,7 +2584,7 @@ AC_CACHE_CHECK([[for calloc()]], [[mhd_cv_have_func_calloc]],
2579 [ 2584 [
2580 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 2585 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2581#include <stdlib.h> 2586#include <stdlib.h>
2582 ]],[[void * ptr = calloc(1, 2)]]) 2587 ]],[[void * ptr = calloc(1, 2); if (ptr) return 1;]])
2583 ], 2588 ],
2584 [[mhd_cv_have_func_calloc='yes']], 2589 [[mhd_cv_have_func_calloc='yes']],
2585 [[mhd_cv_have_func_calloc='no']] 2590 [[mhd_cv_have_func_calloc='no']]