aboutsummaryrefslogtreecommitdiff
path: root/m4/mhd_shutdown_socket_trigger.m4
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-03-14 17:36:40 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-03-14 21:34:26 +0300
commitdcd8ea98694d3087d1af9f7a11570b73c7d1c249 (patch)
treea0c194bad0f4f22a0ad9f8f5f05b1dd62a00ba1b /m4/mhd_shutdown_socket_trigger.m4
parent779bbfb525862bbe3a966a8bcfbfa9c560a2c270 (diff)
downloadlibmicrohttpd-dcd8ea98694d3087d1af9f7a11570b73c7d1c249.tar.gz
libmicrohttpd-dcd8ea98694d3087d1af9f7a11570b73c7d1c249.zip
mhd_check_func_gettimeofday.m4: added new autoconf macro
Diffstat (limited to 'm4/mhd_shutdown_socket_trigger.m4')
-rw-r--r--m4/mhd_shutdown_socket_trigger.m419
1 files changed, 2 insertions, 17 deletions
diff --git a/m4/mhd_shutdown_socket_trigger.m4 b/m4/mhd_shutdown_socket_trigger.m4
index 33505d81..d33c4b18 100644
--- a/m4/mhd_shutdown_socket_trigger.m4
+++ b/m4/mhd_shutdown_socket_trigger.m4
@@ -18,29 +18,14 @@
18# and this notice are preserved. This file is offered as-is, without any 18# and this notice are preserved. This file is offered as-is, without any
19# warranty. 19# warranty.
20 20
21#serial 4 21#serial 5
22 22
23AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl 23AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl
24 AC_PREREQ([2.64])dnl 24 AC_PREREQ([2.64])dnl
25 AC_REQUIRE([AC_CANONICAL_HOST])dnl 25 AC_REQUIRE([AC_CANONICAL_HOST])dnl
26 AC_REQUIRE([AC_PROG_CC])dnl 26 AC_REQUIRE([AC_PROG_CC])dnl
27 AC_REQUIRE([AX_PTHREAD])dnl 27 AC_REQUIRE([AX_PTHREAD])dnl
28 AC_CHECK_HEADERS([sys/time.h time.h])dnl 28 AC_REQUIRE([MHD_CHECK_FUNC_GETTIMEOFDAY])dnl
29 MHD_CHECK_FUNC([[gettimeofday]],
30 [[
31#ifdef HAVE_SYS_TIME_H
32#include <sys/time.h>
33#endif /* HAVE_SYS_TIME_H */
34#ifdef HAVE_TIME_H
35#include <time.h>
36#endif /* HAVE_TIME_H */
37 ]],
38 [[
39 struct timeval tv;
40 if (0 != gettimeofday (&tv, (void*) 0))
41 return 1;
42 ]]
43 )
44 MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]]) 29 MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]])
45 MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]]) 30 MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]])
46 AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT]) 31 AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT])