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

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


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

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

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

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

---

 configure                      | 10 +---------
 configure.ac                   |  5 +----
 dlls/ntdll/unix/file.c         |  4 +---
 dlls/ntdll/unix/process.c      |  4 +---
 dlls/ntdll/unix/sync.c         |  4 +---
 dlls/ntdll/unix/system.c       |  4 +---
 dlls/qcap/v4l.c                |  2 --
 dlls/winex11.drv/x11drv_main.c |  4 +---
 dlls/ws2_32/unixlib.c          |  4 +---
 include/config.h.in            |  3 ---
 10 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/configure b/configure
index 2584c750317..cc4bf14c3cc 100755
--- a/configure
+++ b/configure
@@ -8647,12 +8647,6 @@ if test "x$ac_cv_header_sys_sysinfo_h" = xyes
 then :
   printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_time_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
-
 fi
 ac_fn_c_check_header_compile "$LINENO" "sys/timeout.h" "ac_cv_header_sys_timeout_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_timeout_h" = xyes
@@ -9485,9 +9479,7 @@ then :
 fi
 
 
-ac_fn_c_check_header_compile "$LINENO" "linux/videodev2.h" "ac_cv_header_linux_videodev2_h" "#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
+ac_fn_c_check_header_compile "$LINENO" "linux/videodev2.h" "ac_cv_header_linux_videodev2_h" "#include <sys/time.h>
 #include <sys/types.h>
 #ifdef HAVE_ASM_TYPES_H
 #include <asm/types.h>
diff --git a/configure.ac b/configure.ac
index e08c9861a2b..f6cf66661d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -500,7 +500,6 @@ AC_CHECK_HEADERS(\
 	sys/strtio.h \
 	sys/syscall.h \
 	sys/sysinfo.h \
-	sys/time.h \
 	sys/timeout.h \
 	sys/times.h \
 	sys/uio.h \
@@ -643,9 +642,7 @@ AC_CHECK_HEADERS([pthread_np.h],,,
 #endif])
 
 AC_CHECK_HEADERS([linux/videodev2.h],,,
-[#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
+[#include <sys/time.h>
 #include <sys/types.h>
 #ifdef HAVE_ASM_TYPES_H
 #include <asm/types.h>
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 3124147c94d..d4271fda2a8 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -49,9 +49,7 @@
 # include <sys/syscall.h>
 #endif
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #ifdef HAVE_SYS_ATTR_H
 #include <sys/attr.h>
 #endif
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index 256f43750db..a07bbf43a6e 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -34,9 +34,7 @@
 #include <string.h>
 #include <time.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #ifdef HAVE_SYS_TIMES_H
 # include <sys/times.h>
 #endif
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 51505082862..442243d8bcf 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -37,9 +37,7 @@
 #ifdef HAVE_SYS_SYSCALL_H
 #include <sys/syscall.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <poll.h>
 #include <unistd.h>
 #ifdef HAVE_SCHED_H
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index d1a40e47bbf..c2f1ee11eca 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -33,9 +33,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <time.h>
 #ifdef HAVE_SYS_PARAM_H
 # include <sys/param.h>
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index 9a66a50e31d..aa4d725939a 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -37,9 +37,7 @@
 #endif
 #include <sys/mman.h>
 #include <errno.h>
-#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#endif
 #ifdef HAVE_ASM_TYPES_H
 #include <asm/types.h>
 #endif
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index ab2af7a9e38..32beb84a009 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -26,9 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <unistd.h>
 #include <dlfcn.h>
 #include <X11/cursorfont.h>
diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c
index ea16d1844a1..e89ebe35248 100644
--- a/dlls/ws2_32/unixlib.c
+++ b/dlls/ws2_32/unixlib.c
@@ -33,6 +33,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/time.h>
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
@@ -62,9 +63,6 @@
 # include <ifaddrs.h>
 #endif
 #include <poll.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
 
 #ifdef HAVE_NETIPX_IPX_H
 # include <netipx/ipx.h>
diff --git a/include/config.h.in b/include/config.h.in
index b36b109287d..768f36143d6 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -712,9 +712,6 @@
 /* Define to 1 if you have the <sys/times.h> header file. */
 #undef HAVE_SYS_TIMES_H
 
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 




More information about the wine-cvs mailing list