Alexandre Julliard : configure: Assume that unistd.h is available on Unix.

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


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Dec  9 10:58:13 2021 +0100

configure: Assume that unistd.h is available on Unix.

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

---

 configure                              | 6 ------
 configure.ac                           | 1 -
 dlls/nsiproxy.sys/ndis.c               | 3 ---
 dlls/nsiproxy.sys/tcp.c                | 5 +----
 dlls/ntdll/unix/env.c                  | 8 ++------
 dlls/ntdll/unix/file.c                 | 4 +---
 dlls/qcap/v4l.c                        | 2 --
 dlls/winealsa.drv/midi.c               | 4 +---
 dlls/wineandroid.drv/window.c          | 4 +---
 dlls/winebus.sys/bus_udev.c            | 4 +---
 dlls/winejoystick.drv/joystick_linux.c | 4 +---
 dlls/winex11.drv/clipboard.c           | 4 +---
 dlls/winex11.drv/systray.c             | 4 +---
 dlls/winex11.drv/window.c              | 4 +---
 dlls/winex11.drv/x11drv_main.c         | 4 +---
 dlls/winex11.drv/xdnd.c                | 4 +---
 tools/tools.h                          | 3 ---
 tools/widl/parser.l                    | 5 -----
 tools/wrc/parser.l                     | 5 -----
 tools/wrc/ppl.l                        | 2 --
 20 files changed, 13 insertions(+), 67 deletions(-)

diff --git a/configure b/configure
index d1a52a116f4..c1fdaef554a 100755
--- a/configure
+++ b/configure
@@ -8713,12 +8713,6 @@ if test "x$ac_cv_header_syscall_h" = xyes
 then :
   printf "%s\n" "#define HAVE_SYSCALL_H 1" >>confdefs.h
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
-if test "x$ac_cv_header_unistd_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
-
 fi
 ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
 if test "x$ac_cv_header_utime_h" = xyes
diff --git a/configure.ac b/configure.ac
index d032c60e5c3..b8465cc7489 100644
--- a/configure.ac
+++ b/configure.ac
@@ -511,7 +511,6 @@ AC_CHECK_HEADERS(\
 	sys/vnode.h \
 	sys/wait.h \
 	syscall.h \
-	unistd.h \
 	utime.h \
 	valgrind/memcheck.h \
 	valgrind/valgrind.h
diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c
index 3e37bcecc78..a7820832d9a 100644
--- a/dlls/nsiproxy.sys/ndis.c
+++ b/dlls/nsiproxy.sys/ndis.c
@@ -25,10 +25,7 @@
 #include "config.h"
 
 #include <stdarg.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c
index 9a089ba3de2..c9d3d293229 100644
--- a/dlls/nsiproxy.sys/tcp.c
+++ b/dlls/nsiproxy.sys/tcp.c
@@ -27,15 +27,12 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <unistd.h>
 
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
index 30d8ac1553c..c7e0674e083 100644
--- a/dlls/ntdll/unix/env.c
+++ b/dlls/ntdll/unix/env.c
@@ -33,18 +33,14 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
+#include <unistd.h>
 #ifdef HAVE_SYS_PRCTL_H
 # include <sys/prctl.h>
 #endif
 #ifdef HAVE_PWD_H
 # include <pwd.h>
 #endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
 #ifdef __APPLE__
 # include <CoreFoundation/CFLocale.h>
 # include <CoreFoundation/CFString.h>
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 10d8f3de4a3..5c76a57a48b 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -105,9 +105,7 @@
 #include <sys/statfs.h>
 #endif
 #include <time.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "ntstatus.h"
 #define WIN32_NO_STATUS
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index b8f6254e251..828113afa3c 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -48,9 +48,7 @@
 #ifdef HAVE_LINUX_VIDEODEV2_H
 #include <linux/videodev2.h>
 #endif
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "ntstatus.h"
 #define WIN32_NO_STATUS
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index f2fe6307bb2..073c0a6e3f3 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -36,9 +36,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index c907001c159..fb1b1420227 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -32,9 +32,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #define OEMRESOURCE
 #include "windef.h"
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
index 540a4da508f..2c23c81b9ef 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -31,9 +31,7 @@
 #include <stdint.h>
 #include <sys/types.h>
 #include <dirent.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <poll.h>
 #ifdef HAVE_LIBUDEV_H
 # include <libudev.h>
diff --git a/dlls/winejoystick.drv/joystick_linux.c b/dlls/winejoystick.drv/joystick_linux.c
index 7fd2c95aff1..0280fa2534c 100644
--- a/dlls/winejoystick.drv/joystick_linux.c
+++ b/dlls/winejoystick.drv/joystick_linux.c
@@ -39,9 +39,7 @@
 
 #ifdef HAVE_LINUX_22_JOYSTICK_API
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 4e3320f8ed5..a13d0a55b76 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -69,9 +69,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <fcntl.h>
 #include <dlfcn.h>
 #include <limits.h>
diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c
index 5522b229836..c6d12b21c28 100644
--- a/dlls/winex11.drv/systray.c
+++ b/dlls/winex11.drv/systray.c
@@ -26,9 +26,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <X11/Xlib.h>
 
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index a9fcfb0e295..29473ceba06 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -25,9 +25,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <X11/Xlib.h>
 #include <X11/Xresource.h>
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index e5592184337..ab2af7a9e38 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -29,9 +29,7 @@
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <dlfcn.h>
 #include <X11/cursorfont.h>
 #include <X11/Xlib.h>
diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index b72a168adce..eb685613b7b 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -22,9 +22,7 @@
 #include "config.h"
 
 #include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <stdarg.h>
 #include <stdio.h>
 
diff --git a/tools/tools.h b/tools/tools.h
index 751580d68cb..93a7b3c5b09 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -30,9 +30,6 @@
 #include <fcntl.h>
 #include <time.h>
 #include <errno.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
 
 #ifdef _WIN32
 # include <direct.h>
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index 6070d7e7a1f..fb6aa93e390 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -51,12 +51,7 @@ double	[0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
 #include <assert.h>
 #include <errno.h>
 #include <limits.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#else
 #define YY_NO_UNISTD_H
-#endif
 
 #include "widl.h"
 #include "utils.h"
diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l
index c5d9db1488f..3c3cf973da5 100644
--- a/tools/wrc/parser.l
+++ b/tools/wrc/parser.l
@@ -104,12 +104,7 @@ ws	[ \f\t\r]
 #include <assert.h>
 #include <errno.h>
 #include <limits.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#else
 #define YY_NO_UNISTD_H
-#endif
 
 #include "../tools.h"
 #include "wrc.h"
diff --git a/tools/wrc/ppl.l b/tools/wrc/ppl.l
index 632bb61a665..f27a2b48476 100644
--- a/tools/wrc/ppl.l
+++ b/tools/wrc/ppl.l
@@ -168,9 +168,7 @@ ul	[uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL]
 # define ULLONG_MAX ((__int64)0xffffffff << 32 | 0xffffffff)
 #endif
 
-#ifndef HAVE_UNISTD_H
 #define YY_NO_UNISTD_H
-#endif
 
 #include "../tools.h"
 #include "utils.h"




More information about the wine-cvs mailing list