From a7ac3de3b36e96c556873d1c7dd68f681c48ffbd Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 9 Dec 2021 11:04:40 +0100 Subject: [PATCH] configure: Assume that sys/socket.h is available on Unix. Signed-off-by: Alexandre Julliard --- configure | 116 ++++++++-------------------------- configure.ac | 35 +++------- dlls/nsiproxy.sys/icmp_echo.c | 3 - dlls/nsiproxy.sys/ip.c | 6 -- dlls/nsiproxy.sys/ndis.c | 6 +- dlls/nsiproxy.sys/tcp.c | 5 +- dlls/nsiproxy.sys/udp.c | 10 +-- dlls/ntdll/unix/file.c | 2 - dlls/ntdll/unix/process.c | 2 - dlls/ntdll/unix/server.c | 4 +- dlls/ntdll/unix/socket.c | 4 +- dlls/ntdll/unix/virtual.c | 4 +- dlls/winex11.drv/opengl.c | 2 - dlls/ws2_32/unixlib.c | 4 +- include/config.h.in | 3 - server/mailslot.c | 2 - server/process.c | 4 +- server/request.c | 4 +- server/sock.c | 4 +- 19 files changed, 47 insertions(+), 173 deletions(-) diff --git a/configure b/configure index 7fdc83547f1..2584c750317 100755 --- a/configure +++ b/configure @@ -8611,12 +8611,6 @@ if test "x$ac_cv_header_sys_signal_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h - fi ac_fn_c_check_header_compile "$LINENO" "sys/socketvar.h" "ac_cv_header_sys_socketvar_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socketvar_h" = xyes @@ -8859,9 +8853,7 @@ fi CFLAGS=$saved_sysctl_h_CFLAGS ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -8887,9 +8879,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -8915,9 +8905,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -8943,9 +8931,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -8971,9 +8957,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "net/if_types.h" "ac_cv_header_net_if_types_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -8999,9 +8983,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9027,9 +9009,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9055,9 +9035,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/if_inarp.h" "ac_cv_header_netinet_if_inarp_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9083,9 +9061,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/in_pcb.h" "ac_cv_header_netinet_in_pcb_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9111,9 +9087,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/ip_icmp.h" "ac_cv_header_netinet_ip_icmp_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9139,9 +9113,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/ip_var.h" "ac_cv_header_netinet_ip_var_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9167,9 +9139,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9195,9 +9165,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netipx/ipx.h" "ac_cv_header_netipx_ipx_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9223,9 +9191,7 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9253,12 +9219,10 @@ fi ac_fn_c_check_header_compile "$LINENO" "netinet/tcp_timer.h" "ac_cv_header_netinet_tcp_timer_h" "#include + #include #ifdef HAVE_ALIAS_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9296,12 +9260,10 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/udp_var.h" "ac_cv_header_netinet_udp_var_h" "#include + #include #ifdef HAVE_ALIAS_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9339,12 +9301,10 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/icmp_var.h" "ac_cv_header_netinet_icmp_var_h" "#include + #include #ifdef HAVE_ALIAS_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9382,12 +9342,10 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "netinet/tcp_var.h" "ac_cv_header_netinet_tcp_var_h" "#include + #include #ifdef HAVE_ALIAS_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -9427,12 +9385,10 @@ fi ac_fn_c_check_header_compile "$LINENO" "linux/ipx.h" "ac_cv_header_linux_ipx_h" "#include + #include #ifdef HAVE_ASM_TYPES_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_LINUX_TYPES_H # include #endif @@ -9443,12 +9399,10 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "linux/irda.h" "ac_cv_header_linux_irda_h" "#include + #include #ifdef HAVE_ASM_TYPES_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_LINUX_TYPES_H # include #endif @@ -9459,12 +9413,10 @@ then : fi ac_fn_c_check_header_compile "$LINENO" "linux/rtnetlink.h" "ac_cv_header_linux_rtnetlink_h" "#include + #include #ifdef HAVE_ASM_TYPES_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_LINUX_TYPES_H # include #endif @@ -9477,9 +9429,7 @@ fi ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_NETINET_IN_H # include #endif @@ -9553,12 +9503,10 @@ fi ac_fn_c_check_header_compile "$LINENO" "libprocstat.h" "ac_cv_header_libprocstat_h" "#ifdef HAVE_SYS_PARAM_H #include #endif +#include #ifdef HAVE_SYS_QUEUE_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif " if test "x$ac_cv_header_libprocstat_h" = xyes then : @@ -20689,9 +20637,7 @@ fi ac_fn_c_check_type "$LINENO" "struct xinpgen" "ac_cv_type_struct_xinpgen" "#include -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_SYS_SOCKETVAR_H #include #endif @@ -20866,9 +20812,7 @@ printf "%s\n" "#define HAVE_LINUX_22_JOYSTICK_API 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrights" "ac_cv_member_struct_msghdr_msg_accrights" "#include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_SYS_UN_H # include #endif @@ -20881,9 +20825,7 @@ printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "#include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_SYS_UN_H # include #endif @@ -21135,15 +21077,11 @@ printf "%s\n" "#define HAVE_STRUCT_ICMPSTAT_ICPS_INHIST 1" >>confdefs.h fi -ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_outhist" "ac_cv_member_struct_icmpstat_icps_outhist" "#ifdef HAVE_SYS_TYPES_H -#include -#endif +ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_outhist" "ac_cv_member_struct_icmpstat_icps_outhist" "#include +#include #ifdef HAVE_ALIAS_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_SYS_SOCKETVAR_H #include #endif diff --git a/configure.ac b/configure.ac index ef25cfe1d97..e08c9861a2b 100644 --- a/configure.ac +++ b/configure.ac @@ -494,7 +494,6 @@ AC_CHECK_HEADERS(\ sys/scsiio.h \ sys/shm.h \ sys/signal.h \ - sys/socket.h \ sys/socketvar.h \ sys/sockio.h \ sys/statvfs.h \ @@ -551,9 +550,7 @@ AC_CHECK_HEADERS(\ netipx/ipx.h \ sys/un.h \ ,,,[#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -575,12 +572,10 @@ AC_CHECK_HEADERS(\ AC_CHECK_HEADERS([netinet/tcp_timer.h netinet/udp_var.h netinet/icmp_var.h netinet/tcp_var.h ],,, [#include + #include #ifdef HAVE_ALIAS_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_SYS_SOCKETVAR_H # include #endif @@ -614,21 +609,17 @@ AC_CHECK_HEADERS([netinet/tcp_timer.h netinet/udp_var.h netinet/icmp_var.h netin AC_CHECK_HEADERS([linux/ipx.h linux/irda.h linux/rtnetlink.h],,, [#include + #include #ifdef HAVE_ASM_TYPES_H # include #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif #ifdef HAVE_LINUX_TYPES_H # include #endif]) AC_CHECK_HEADERS([resolv.h],,, [#include - #ifdef HAVE_SYS_SOCKET_H - # include - #endif + #include #ifdef HAVE_NETINET_IN_H # include #endif @@ -664,11 +655,9 @@ AC_CHECK_HEADERS([libprocstat.h],,, [#ifdef HAVE_SYS_PARAM_H #include #endif +#include #ifdef HAVE_SYS_QUEUE_H #include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include #endif]) dnl **** Check for working dll **** @@ -2096,9 +2085,7 @@ AC_CHECK_TYPES([request_sense],,,[#include ]) AC_CHECK_TYPES([struct xinpgen],,, [#include -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_SYS_SOCKETVAR_H #include #endif @@ -2179,9 +2166,7 @@ fi dnl Check for socket structure members AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr_un.sun_len],,, [#include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_SYS_UN_H # include #endif]) @@ -2264,15 +2249,11 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_inhist],,, dnl Check for struct icmpstat.icps_outhist AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif +[#include +#include #ifdef HAVE_ALIAS_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_SYS_SOCKETVAR_H #include #endif diff --git a/dlls/nsiproxy.sys/icmp_echo.c b/dlls/nsiproxy.sys/icmp_echo.c index 07d76f0fda2..cfebb287547 100644 --- a/dlls/nsiproxy.sys/icmp_echo.c +++ b/dlls/nsiproxy.sys/icmp_echo.c @@ -30,10 +30,7 @@ #include #include #include - -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_NETINET_IN_H #include diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c index 432fe9d8e65..3194dd15524 100644 --- a/dlls/nsiproxy.sys/ip.c +++ b/dlls/nsiproxy.sys/ip.c @@ -24,14 +24,8 @@ #include "config.h" #include - -#ifdef HAVE_SYS_TYPES_H #include -#endif - -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_NET_ROUTE_H #include diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c index a7820832d9a..bb69c852253 100644 --- a/dlls/nsiproxy.sys/ndis.c +++ b/dlls/nsiproxy.sys/ndis.c @@ -25,11 +25,9 @@ #include "config.h" #include -#include - -#ifdef HAVE_SYS_SOCKET_H +#include #include -#endif +#include #ifdef HAVE_NET_IF_H #include diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c index c9d3d293229..6dd0aaa9b45 100644 --- a/dlls/nsiproxy.sys/tcp.c +++ b/dlls/nsiproxy.sys/tcp.c @@ -26,6 +26,7 @@ #include "config.h" #include #include +#include #include #include @@ -33,10 +34,6 @@ #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #ifdef HAVE_SYS_SOCKETVAR_H #include #endif diff --git a/dlls/nsiproxy.sys/udp.c b/dlls/nsiproxy.sys/udp.c index 403431acbef..fe05bc875cf 100644 --- a/dlls/nsiproxy.sys/udp.c +++ b/dlls/nsiproxy.sys/udp.c @@ -25,23 +25,17 @@ #include "config.h" #include #include +#include +#include #ifdef HAVE_SYS_PARAM_H #include #endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - #ifdef HAVE_SYS_SYSCTL_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #ifdef HAVE_SYS_SOCKETVAR_H #include #endif diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 5c76a57a48b..3124147c94d 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -48,9 +48,7 @@ #ifdef HAVE_SYS_SYSCALL_H # include #endif -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_SYS_TIME_H # include #endif diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index b2457905698..256f43750db 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -33,9 +33,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_SYS_TIME_H # include #endif diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index caee1f794db..8c8dcf24477 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -44,9 +44,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_SYS_WAIT_H #include #endif diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 2e79b9baa0f..ee27912a3e8 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -25,6 +25,7 @@ #include "config.h" #include #include +#include #include #ifdef HAVE_IFADDRS_H # include @@ -35,9 +36,6 @@ #ifdef HAVE_SYS_IOCTL_H # include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H # define __APPLE_USE_RFC_3542 # include diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 2ed7a74b875..1f817cd977d 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -33,9 +33,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #include #include #ifdef HAVE_SYS_SYSINFO_H diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index d46cac58593..567205f742c 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -29,9 +29,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_SYS_UN_H #include #endif diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index f1f43fbdb30..ea16d1844a1 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -32,9 +32,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_NETDB_H # include #endif diff --git a/include/config.h.in b/include/config.h.in index 8ad37e3d479..b36b109287d 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -679,9 +679,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKETVAR_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKIO_H diff --git a/server/mailslot.c b/server/mailslot.c index 4048461a58f..5878ba1408a 100644 --- a/server/mailslot.c +++ b/server/mailslot.c @@ -34,9 +34,7 @@ #ifdef HAVE_SYS_IOCTL_H #include #endif -#ifdef HAVE_SYS_SOCKET_H #include -#endif #ifdef HAVE_SYS_FILIO_H #include #endif diff --git a/server/process.c b/server/process.c index 81c94a3c81d..0cc7f6b60ee 100644 --- a/server/process.c +++ b/server/process.c @@ -31,9 +31,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #include #include #ifdef HAVE_SYS_PARAM_H diff --git a/server/request.c b/server/request.c index b7d2713aaa5..086e5f63919 100644 --- a/server/request.c +++ b/server/request.c @@ -34,9 +34,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_SYS_WAIT_H # include #endif diff --git a/server/sock.c b/server/sock.c index c9b71137c4c..9a686325b27 100644 --- a/server/sock.c +++ b/server/sock.c @@ -42,9 +42,7 @@ #include #include #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +#include #ifdef HAVE_SYS_IOCTL_H #include #endif