Alexandre Julliard : configure: Assume that sys/ioctl.h is available on Unix.

Alexandre Julliard julliard at winehq.org
Thu Dec 9 15:34:29 CST 2021


Module: wine
Branch: master
Commit: e5d69d9ee6b01e359abe0ea326c5e13bf81e3042
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e5d69d9ee6b01e359abe0ea326c5e13bf81e3042

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Dec  9 11:09:50 2021 +0100

configure: Assume that sys/ioctl.h is available on Unix.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                              | 6 ------
 configure.ac                           | 1 -
 dlls/avicap32/v4l.c                    | 8 ++------
 dlls/mountmgr.sys/diskarb.c            | 4 +---
 dlls/nsiproxy.sys/ndis.c               | 5 +----
 dlls/ntdll/unix/cdrom.c                | 3 ---
 dlls/ntdll/unix/file.c                 | 4 +---
 dlls/ntdll/unix/serial.c               | 4 +---
 dlls/ntdll/unix/socket.c               | 4 +---
 dlls/ntdll/unix/tape.c                 | 2 --
 dlls/qcap/v4l.c                        | 2 --
 dlls/winebus.sys/bus_udev.c            | 4 +---
 dlls/winejoystick.drv/joystick_linux.c | 2 --
 dlls/wineoss.drv/midi.c                | 4 +---
 dlls/wineoss.drv/mmaux.c               | 4 +---
 include/config.h.in                    | 3 ---
 server/mailslot.c                      | 2 --
 server/serial.c                        | 4 +---
 server/sock.c                          | 2 --
 19 files changed, 11 insertions(+), 57 deletions(-)

diff --git a/configure b/configure
index cc4bf14c3cc..00e3e7844a1 100755
--- a/configure
+++ b/configure
@@ -8521,12 +8521,6 @@ if test "x$ac_cv_header_sys_filio_h" = xyes
 then :
   printf "%s\n" "#define HAVE_SYS_FILIO_H 1" >>confdefs.h
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_ioctl_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
-
 fi
 ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_ipc_h" = xyes
diff --git a/configure.ac b/configure.ac
index f6cf66661d5..760e4f0ed04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -479,7 +479,6 @@ AC_CHECK_HEADERS(\
 	sys/epoll.h \
 	sys/event.h \
 	sys/filio.h \
-	sys/ioctl.h \
 	sys/ipc.h \
 	sys/link.h \
 	sys/modem.h \
diff --git a/dlls/avicap32/v4l.c b/dlls/avicap32/v4l.c
index 4b285d94c3c..4f3a162c838 100644
--- a/dlls/avicap32/v4l.c
+++ b/dlls/avicap32/v4l.c
@@ -28,12 +28,8 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <unistd.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
+#include <sys/ioctl.h>
 #ifdef HAVE_LINUX_VIDEODEV2_H
 # include <linux/videodev2.h>
 #endif
diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c
index e034a4c1c5b..50a32bef079 100644
--- a/dlls/mountmgr.sys/diskarb.c
+++ b/dlls/mountmgr.sys/diskarb.c
@@ -30,9 +30,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <unistd.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
 #ifdef HAVE_DISKARBITRATION_DISKARBITRATION_H
 #include <DiskArbitration/DiskArbitration.h>
 #endif
diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c
index bb69c852253..86c4248c9ec 100644
--- a/dlls/nsiproxy.sys/ndis.c
+++ b/dlls/nsiproxy.sys/ndis.c
@@ -27,6 +27,7 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/ioctl.h>
 #include <unistd.h>
 
 #ifdef HAVE_NET_IF_H
@@ -49,10 +50,6 @@
 #include <net/route.h>
 #endif
 
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
 #ifdef HAVE_SYS_SYSCTL_H
 #include <sys/sysctl.h>
 #endif
diff --git a/dlls/ntdll/unix/cdrom.c b/dlls/ntdll/unix/cdrom.c
index db3b9cd25c2..a9385daf099 100644
--- a/dlls/ntdll/unix/cdrom.c
+++ b/dlls/ntdll/unix/cdrom.c
@@ -41,10 +41,7 @@
 # include <sys/sysmacros.h>
 #endif
 #include <sys/types.h>
-
-#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif
 #ifdef HAVE_SCSI_SG_H
 # include <scsi/sg.h>
 #endif
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index d4271fda2a8..e459087af76 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -50,6 +50,7 @@
 #endif
 #include <sys/socket.h>
 #include <sys/time.h>
+#include <sys/ioctl.h>
 #ifdef HAVE_SYS_ATTR_H
 #include <sys/attr.h>
 #endif
@@ -79,9 +80,6 @@
 #undef list_move_tail
 #undef list_remove
 #endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
 #ifdef HAVE_LINUX_IOCTL_H
 #include <linux/ioctl.h>
 #endif
diff --git a/dlls/ntdll/unix/serial.c b/dlls/ntdll/unix/serial.c
index ff2786ada70..16c5964b77b 100644
--- a/dlls/ntdll/unix/serial.c
+++ b/dlls/ntdll/unix/serial.c
@@ -36,12 +36,10 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/ioctl.h>
 #ifdef HAVE_SYS_FILIO_H
 # include <sys/filio.h>
 #endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
 #ifdef HAVE_SYS_MODEM_H
 # include <sys/modem.h>
 #endif
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index ee27912a3e8..59551aa51e8 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -26,6 +26,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/ioctl.h>
 #include <unistd.h>
 #ifdef HAVE_IFADDRS_H
 # include <ifaddrs.h>
@@ -33,9 +34,6 @@
 #ifdef HAVE_NET_IF_H
 # include <net/if.h>
 #endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 # define __APPLE_USE_RFC_3542
 # include <netinet/in.h>
diff --git a/dlls/ntdll/unix/tape.c b/dlls/ntdll/unix/tape.c
index 741de2f6d95..40ac307a632 100644
--- a/dlls/ntdll/unix/tape.c
+++ b/dlls/ntdll/unix/tape.c
@@ -31,9 +31,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
-#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif
 #ifdef HAVE_SYS_MTIO_H
 #include <sys/mtio.h>
 #endif
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index aa4d725939a..ae663389d14 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -32,9 +32,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <dlfcn.h>
-#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif
 #include <sys/mman.h>
 #include <errno.h>
 #include <sys/time.h>
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
index 2c23c81b9ef..53dca8fce56 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -33,15 +33,13 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <poll.h>
+#include <sys/ioctl.h>
 #ifdef HAVE_LIBUDEV_H
 # include <libudev.h>
 #endif
 #ifdef HAVE_LINUX_HIDRAW_H
 # include <linux/hidraw.h>
 #endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
 #ifdef HAVE_SYS_INOTIFY_H
 # include <sys/inotify.h>
 #endif
diff --git a/dlls/winejoystick.drv/joystick_linux.c b/dlls/winejoystick.drv/joystick_linux.c
index 0280fa2534c..50f06bc7331 100644
--- a/dlls/winejoystick.drv/joystick_linux.c
+++ b/dlls/winejoystick.drv/joystick_linux.c
@@ -44,9 +44,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
-#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif
 #ifdef HAVE_LINUX_IOCTL_H
 #include <linux/ioctl.h>
 #endif
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c
index 7128d07ec50..439bc9e442c 100644
--- a/dlls/wineoss.drv/midi.c
+++ b/dlls/wineoss.drv/midi.c
@@ -49,9 +49,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
 #include <poll.h>
 #include <sys/soundcard.h>
 
diff --git a/dlls/wineoss.drv/mmaux.c b/dlls/wineoss.drv/mmaux.c
index 26fea510eae..7d0b8ed53cc 100644
--- a/dlls/wineoss.drv/mmaux.c
+++ b/dlls/wineoss.drv/mmaux.c
@@ -26,9 +26,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
 #include <sys/soundcard.h>
 
 #include "windef.h"
diff --git a/include/config.h.in b/include/config.h.in
index 768f36143d6..7f57ce10a7d 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -628,9 +628,6 @@
 /* Define to 1 if you have the <sys/inotify.h> header file. */
 #undef HAVE_SYS_INOTIFY_H
 
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
 /* Define to 1 if you have the <sys/ipc.h> header file. */
 #undef HAVE_SYS_IPC_H
 
diff --git a/server/mailslot.c b/server/mailslot.c
index 5878ba1408a..2d8697ec9bd 100644
--- a/server/mailslot.c
+++ b/server/mailslot.c
@@ -31,9 +31,7 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <unistd.h>
-#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif
 #include <sys/socket.h>
 #ifdef HAVE_SYS_FILIO_H
 #include <sys/filio.h>
diff --git a/server/serial.c b/server/serial.c
index 905bde4d69a..d665eb7fa35 100644
--- a/server/serial.c
+++ b/server/serial.c
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <sys/ioctl.h>
 #include <time.h>
 #include <termios.h>
 #include <unistd.h>
@@ -37,9 +38,6 @@
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
 
 #include "ntstatus.h"
 #define WIN32_NO_STATUS
diff --git a/server/sock.c b/server/sock.c
index 9a686325b27..8521e34ed7e 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -43,9 +43,7 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif
 #ifdef HAVE_SYS_FILIO_H
 # include <sys/filio.h>
 #endif




More information about the wine-cvs mailing list