gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 210/335: configure: improved tests for non-standard plat


From: gnunet
Subject: [libmicrohttpd] 210/335: configure: improved tests for non-standard platforms
Date: Sat, 27 Jul 2024 22:01:46 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.

commit 2ae99d794f1753e2cf14da2167e752d3b160299d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Jun 21 12:42:43 2024 +0200

    configure: improved tests for non-standard platforms
---
 configure.ac | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 51 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2d7a2560..45faddd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -509,7 +509,9 @@ AC_CHECK_HEADERS([sys/socket.h sys/select.h 
netinet/in_systm.h netinet/in.h \
 #endif /* HAVE_INTTYPES_H */
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#endif /* HAVE_SYS_SOCKET_H */
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
 #ifdef HAVE_NETINET_IN_SYSTM_H
 #include <netinet/in_systm.h>
 #endif /* HAVE_NETINET_IN_SYSTM_H */
@@ -685,7 +687,9 @@ AC_CHECK_HEADERS([sys/sysctl.h netinet/ip_icmp.h 
netinet/icmp_var.h], [], [],
 #endif /* HAVE_SYS_SYSCTL_H */
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#endif /* HAVE_SYS_SOCKET_H */
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
 #ifdef HAVE_NETINET_IN_SYSTM_H
 #include <netinet/in_systm.h>
 #endif /* HAVE_NETINET_IN_SYSTM_H */
@@ -1743,6 +1747,8 @@ MHD_FIND_LIB([socket],
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 #ifdef HAVE_SOCKLIB_H
 #include <sockLib.h>
@@ -2329,6 +2335,8 @@ MHD_FIND_LIB([sendmsg],
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 #ifdef HAVE_SOCKLIB_H
 #include <sockLib.h>
@@ -2706,6 +2714,8 @@ AC_CHECK_MEMBERS([struct sockaddr.sa_len, struct 
sockaddr_storage.ss_len,
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
@@ -3229,6 +3239,8 @@ AC_CHECK_DECL([SOCK_NONBLOCK], 
[AC_DEFINE([HAVE_SOCK_NONBLOCK], [1], [SOCK_NONBL
 #  include <sys/socket.h>
 #elif defined(HAVE_WINSOCK2_H)
 #  include <winsock2.h>
+#elif defined(HAVE_UNISTD_H)
+#  include <unistd.h>
 #endif
   ]]
 )
@@ -3310,11 +3322,13 @@ AC_CACHE_CHECK([for IPv6],[mhd_cv_have_inet6],
   [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
 #endif
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
@@ -3324,9 +3338,8 @@ AC_CACHE_CHECK([for IPv6],[mhd_cv_have_inet6],
 #endif
           ]], [[
   int af=AF_INET6;
-  int pf=PF_INET6;
   struct sockaddr_in6 sa;
-  printf("%d %d %p\n", af, pf, (void*) &sa);
+  printf("%d %p\n", (int) af, (void*) &sa);
           ]]
         )
       ],
@@ -3371,7 +3384,9 @@ MHD_CHECK_FUNC([[sysctl]], [[
 #endif /* HAVE_SYS_SYSCTL_H */
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#endif /* HAVE_SYS_SOCKET_H */
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
 #ifdef HAVE_NETINET_IN_SYSTM_H
 #include <netinet/in_systm.h>
 #endif /* HAVE_NETINET_IN_SYSTM_H */
@@ -3677,8 +3692,15 @@ AS_VAR_IF([[found_sendfile]], [["no"]],
    AC_LINK_IFELSE(
      [AC_LANG_PROGRAM(
        [[
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <sys/uio.h>
 
 static void empty_func(void)
@@ -3718,8 +3740,15 @@ AS_VAR_IF([[found_sendfile]], [["no"]],
    AC_LINK_IFELSE(
      [AC_LANG_PROGRAM(
        [[
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <sys/uio.h>
 
 static void empty_func(void)
@@ -3761,8 +3790,15 @@ AS_VAR_IF([[found_sendfile]], [["no"]],
    AC_LINK_IFELSE(
      [AC_LANG_PROGRAM(
        [[
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <sys/sendfile.h>
 
 static void empty_func(void)
@@ -3793,8 +3829,15 @@ ssize_t sendfile(int out_fd, int in_fd,
        AC_MSG_RESULT([[yes]])
        MHD_CHECK_FUNC([sendfile64],
          [[
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <sys/sendfile.h>
          ]],
          [[

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]