From d016f819f171d1ef07d4033e70dd7819c719a84f Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Sat, 17 Aug 2002 00:43:16 +0000 Subject: [PATCH] Added include protection for unistd.h and sys/time.h. --- controls/desktop.c | 6 +++++- controls/icontitle.c | 6 +++++- dlls/ddraw/direct3d/main.c | 4 +++- dlls/ddraw/direct3d/mesa.c | 4 +++- dlls/dinput/joystick/linux.c | 8 ++++++-- dlls/dinput/joystick/linuxinput.c | 8 ++++++-- dlls/dsound/buffer.c | 4 +++- dlls/dsound/capture.c | 4 +++- dlls/dsound/dsound_main.c | 4 +++- dlls/dsound/mixer.c | 4 +++- dlls/dsound/primary.c | 4 +++- dlls/dsound/propset.c | 4 +++- dlls/dsound/sound3d.c | 4 +++- dlls/gdi/printdrv.c | 4 +++- dlls/gdi/win16drv/prtdrv.c | 6 +++++- dlls/icmp/icmp_main.c | 8 ++++++-- dlls/kernel/comm.c | 4 +++- dlls/kernel/console.c | 4 +++- dlls/kernel/sync.c | 4 +++- dlls/kernel/thunk.c | 6 +++++- dlls/kernel/time.c | 8 ++++++-- dlls/kernel/toolhelp.c | 6 +++++- dlls/lzexpand/lzexpand_main.c | 4 +++- dlls/mpr/wnet.c | 6 +++++- dlls/msvcrt/file.c | 4 +++- dlls/netapi32/netapi32.c | 4 +++- dlls/ntdll/cdrom.c | 4 +++- dlls/ntdll/debugtools.c | 4 +++- dlls/ntdll/file.c | 4 +++- dlls/ntdll/om.c | 6 +++++- dlls/ntdll/sec.c | 4 +++- dlls/ntdll/signal_i386.c | 4 +++- dlls/ntdll/signal_sparc.c | 4 +++- dlls/ntdll/time.c | 10 ++++++++-- dlls/ole32/storage.c | 6 +++++- dlls/oleaut32/olepicture.c | 4 +++- dlls/rpcrt4/rpcrt4_main.c | 8 ++++++-- dlls/shell32/iconcache.c | 6 +++++- dlls/shell32/shell.c | 4 +++- dlls/shell32/shelllink.c | 4 +++- dlls/shell32/shlexec.c | 4 +++- dlls/shell32/systray.c | 4 +++- dlls/twain/ds_ctrl.c | 6 +++++- dlls/user/exticon.c | 4 +++- dlls/user/network.c | 6 +++++- dlls/version/resource.c | 4 +++- dlls/win32s/w32sys.c | 6 +++++- dlls/winaspi/aspi.c | 4 +++- dlls/winaspi/winaspi16.c | 4 +++- dlls/winaspi/winaspi32.c | 4 +++- dlls/winedos/dosvm.c | 8 ++++++-- dlls/winedos/int16.c | 4 +++- dlls/winedos/module.c | 8 ++++++-- dlls/winedos/xms.c | 6 +++++- dlls/wineps/init.c | 4 +++- dlls/wininet/ftp.c | 4 +++- dlls/wininet/http.c | 4 +++- dlls/wininet/internet.c | 8 ++++++-- dlls/winmm/joystick.c | 4 +++- dlls/winmm/joystick/joystick.c | 4 +++- dlls/winmm/time.c | 8 ++++++-- dlls/winmm/winealsa/audio.c | 4 +++- dlls/winmm/winealsa/audio_05.c | 4 +++- dlls/winmm/winearts/audio.c | 4 +++- dlls/winmm/wineaudioio/audio.c | 4 +++- dlls/winmm/winenas/audio.c | 8 ++++++-- dlls/winmm/wineoss/audio.c | 4 +++- dlls/winmm/wineoss/midi.c | 4 +++- dlls/winmm/wineoss/mixer.c | 4 +++- dlls/winmm/wineoss/mmaux.c | 4 +++- dlls/winsock/async.c | 4 +++- dlls/winsock/socket.c | 4 +++- dlls/wsock32/socket.c | 4 +++- dlls/x11drv/clipboard.c | 4 +++- dlls/x11drv/x11drv_main.c | 8 ++++++-- files/change.c | 6 +++++- files/directory.c | 4 +++- files/dos_fs.c | 4 +++- files/drive.c | 4 +++- files/file.c | 8 ++++++-- files/profile.c | 4 +++- files/smb.c | 8 ++++++-- graphics/x11drv/xfont.c | 4 +++- loader/main.c | 6 +++++- loader/module.c | 6 +++++- loader/ne/module.c | 4 +++- loader/ne/resource.c | 4 +++- loader/ne/segment.c | 6 +++++- loader/resource.c | 6 +++++- loader/task.c | 4 +++- memory/global.c | 4 +++- memory/registry.c | 6 +++++- memory/virtual.c | 4 +++- misc/main.c | 8 ++++++-- misc/registry.c | 4 +++- msdos/dosconf.c | 4 +++- msdos/dpmi.c | 4 +++- msdos/int13.c | 6 +++++- msdos/int1a.c | 6 +++++- msdos/int21.c | 8 ++++++-- msdos/int25.c | 6 +++++- msdos/int26.c | 6 +++++- msdos/ioports.c | 4 +++- msdos/vxd.c | 6 +++++- scheduler/client.c | 4 +++- scheduler/handle.c | 6 +++++- scheduler/process.c | 4 +++- scheduler/pthread.c | 4 +++- scheduler/synchro.c | 10 ++++++++-- scheduler/sysdeps.c | 8 ++++++-- scheduler/syslevel.c | 6 +++++- scheduler/thread.c | 4 +++- win32/device.c | 4 +++- win32/init.c | 6 +++++- win32/kernel32.c | 6 +++++- win32/newfns.c | 10 ++++++++-- win32/time.c | 10 ++++++++-- windows/clipboard.c | 6 +++++- windows/message.c | 6 +++++- windows/winhelp.c | 6 +++++- 120 files changed, 490 insertions(+), 140 deletions(-) diff --git a/controls/desktop.c b/controls/desktop.c index f3df7b0025..b26d828362 100644 --- a/controls/desktop.c +++ b/controls/desktop.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "wingdi.h" diff --git a/controls/icontitle.c b/controls/icontitle.c index e24bb3f892..68b946bfb7 100644 --- a/controls/icontitle.c +++ b/controls/icontitle.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/dlls/ddraw/direct3d/main.c b/dlls/ddraw/direct3d/main.c index 61f5fb6267..c63456553d 100644 --- a/dlls/ddraw/direct3d/main.c +++ b/dlls/ddraw/direct3d/main.c @@ -19,7 +19,9 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/ddraw/direct3d/mesa.c b/dlls/ddraw/direct3d/mesa.c index ddbee96858..5c2dac9860 100644 --- a/dlls/ddraw/direct3d/mesa.c +++ b/dlls/ddraw/direct3d/mesa.c @@ -20,7 +20,9 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/dinput/joystick/linux.c b/dlls/dinput/joystick/linux.c index 79d2e3aaa1..46ea8dcf52 100644 --- a/dlls/dinput/joystick/linux.c +++ b/dlls/dinput/joystick/linux.c @@ -27,8 +27,12 @@ #include #include #include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #ifdef HAVE_SYS_IOCTL_H # include diff --git a/dlls/dinput/joystick/linuxinput.c b/dlls/dinput/joystick/linuxinput.c index f70cc9e3b6..679709f548 100644 --- a/dlls/dinput/joystick/linuxinput.c +++ b/dlls/dinput/joystick/linuxinput.c @@ -28,8 +28,12 @@ #include #include #include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #ifdef HAVE_SYS_IOCTL_H # include diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index cce69d6328..5e2552ca01 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include /* Insomnia - pow() function */ diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 533402bd3f..e7fc8352d6 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -28,7 +28,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index 10d1a879ee..f6012b9345 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -43,7 +43,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include /* Insomnia - pow() function */ diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index cdc303468a..c6e7013447 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include /* Insomnia - pow() function */ diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 61b294d10a..3b7a5cd98f 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include /* Insomnia - pow() function */ diff --git a/dlls/dsound/propset.c b/dlls/dsound/propset.c index 358a6cc860..2cc6ac3260 100644 --- a/dlls/dsound/propset.c +++ b/dlls/dsound/propset.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include /* Insomnia - pow() function */ diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index a352888ce7..a0b867cb6c 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -41,7 +41,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include /* Insomnia - pow() function */ diff --git a/dlls/gdi/printdrv.c b/dlls/gdi/printdrv.c index 0ae8f4cb55..15ac5a58c3 100644 --- a/dlls/gdi/printdrv.c +++ b/dlls/gdi/printdrv.c @@ -28,7 +28,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winbase.h" #include "winuser.h" diff --git a/dlls/gdi/win16drv/prtdrv.c b/dlls/gdi/win16drv/prtdrv.c index d401f85ad1..28c7256fc5 100644 --- a/dlls/gdi/win16drv/prtdrv.c +++ b/dlls/gdi/win16drv/prtdrv.c @@ -18,11 +18,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "wine/winbase16.h" #include "winuser.h" diff --git a/dlls/icmp/icmp_main.c b/dlls/icmp/icmp_main.c index 8fd1882217..80f56150ed 100644 --- a/dlls/icmp/icmp_main.c +++ b/dlls/icmp/icmp_main.c @@ -49,10 +49,14 @@ # include #endif -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_ARPA_INET_H # include #endif diff --git a/dlls/kernel/comm.c b/dlls/kernel/comm.c index 3bcb441439..ae3b2f1f02 100644 --- a/dlls/kernel/comm.c +++ b/dlls/kernel/comm.c @@ -71,7 +71,9 @@ #ifdef HAVE_SYS_IOCTL_H #include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_MODEM_H # include diff --git a/dlls/kernel/console.c b/dlls/kernel/console.c index 223801270e..0788ffe80f 100644 --- a/dlls/kernel/console.c +++ b/dlls/kernel/console.c @@ -33,7 +33,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winbase.h" diff --git a/dlls/kernel/sync.c b/dlls/kernel/sync.c index 0048edfe6e..62b80cc50f 100644 --- a/dlls/kernel/sync.c +++ b/dlls/kernel/sync.c @@ -21,7 +21,9 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_IOCTL_H #include diff --git a/dlls/kernel/thunk.c b/dlls/kernel/thunk.c index 676f7b9f6c..3a2fb0d06d 100644 --- a/dlls/kernel/thunk.c +++ b/dlls/kernel/thunk.c @@ -20,9 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/dlls/kernel/time.c b/dlls/kernel/time.c index 2f604bbdc0..01e0c07561 100644 --- a/dlls/kernel/time.c +++ b/dlls/kernel/time.c @@ -21,9 +21,13 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include "file.h" #include "ntddk.h" diff --git a/dlls/kernel/toolhelp.c b/dlls/kernel/toolhelp.c index f128d65097..0602cd9490 100644 --- a/dlls/kernel/toolhelp.c +++ b/dlls/kernel/toolhelp.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include "winbase.h" diff --git a/dlls/lzexpand/lzexpand_main.c b/dlls/lzexpand/lzexpand_main.c index a9a2a89a0e..4a872f46b6 100644 --- a/dlls/lzexpand/lzexpand_main.c +++ b/dlls/lzexpand/lzexpand_main.c @@ -26,7 +26,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "lzexpand.h" diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 8de75c6569..f09b52ad05 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -18,10 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "winnls.h" diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index c830f10339..07e1b6506d 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -26,7 +26,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "ntddk.h" #include "msvcrt.h" diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index 3b91f736e7..c369d23146 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -21,7 +21,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "winreg.h" diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index c5ff3eefa6..ba59d589d1 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -25,7 +25,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c index c10cf531ee..9cf808d2f3 100644 --- a/dlls/ntdll/debugtools.c +++ b/dlls/ntdll/debugtools.c @@ -25,7 +25,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "wine/debug.h" diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index d79968e7ad..1439715fb7 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -23,7 +23,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_SYS_ERRNO_H #include #endif diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c index 56f65232de..be876c89be 100644 --- a/dlls/ntdll/om.c +++ b/dlls/ntdll/om.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "wine/debug.h" #include "ntddk.h" diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index cef57ae534..f97dd3874a 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -28,7 +28,9 @@ #ifdef HAVE_PWD_H # include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 4200d58379..f21bb01d81 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -27,7 +27,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_SYS_PARAM_H # include diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c index 66f49cf0b1..250f617a56 100644 --- a/dlls/ntdll/signal_sparc.c +++ b/dlls/ntdll/signal_sparc.c @@ -24,7 +24,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index c07cabeb5a..218c03375e 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -22,10 +22,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include "ntddk.h" #include "wine/debug.h" diff --git a/dlls/ole32/storage.c b/dlls/ole32/storage.c index 2cfc5aeef8..2a22166fa7 100644 --- a/dlls/ole32/storage.c +++ b/dlls/ole32/storage.c @@ -21,11 +21,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "ntddk.h" #include "winerror.h" diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index d3bd40fc72..117f160539 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -37,7 +37,9 @@ #include "config.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include "winerror.h" diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 735134f634..27b60bd9dc 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -24,8 +24,12 @@ #include #include #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "wine/windef16.h" diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index bd7b9d653b..7bafdddf1b 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "windef.h" #include "wingdi.h" diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c index 5cb71e884e..a380482a40 100644 --- a/dlls/shell32/shell.c +++ b/dlls/shell32/shell.c @@ -23,7 +23,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "windef.h" diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index e6c304321d..55d4b045e9 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -22,7 +22,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_WAIT_H # include diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 0014a5695a..53010785f7 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/dlls/shell32/systray.c b/dlls/shell32/systray.c index 84ea9254bd..6bd0ae58e4 100644 --- a/dlls/shell32/systray.c +++ b/dlls/shell32/systray.c @@ -24,7 +24,9 @@ #include "config.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/dlls/twain/ds_ctrl.c b/dlls/twain/ds_ctrl.c index 4dd351541e..bc6841a539 100644 --- a/dlls/twain/ds_ctrl.c +++ b/dlls/twain/ds_ctrl.c @@ -16,7 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "config.h" + +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "twain.h" #include "twain_i.h" diff --git a/dlls/user/exticon.c b/dlls/user/exticon.c index bcc706351a..4444bc77d7 100644 --- a/dlls/user/exticon.c +++ b/dlls/user/exticon.c @@ -27,7 +27,9 @@ #include #include /* abs() */ #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "windef.h" diff --git a/dlls/user/network.c b/dlls/user/network.c index adf55a6377..91854181b1 100644 --- a/dlls/user/network.c +++ b/dlls/user/network.c @@ -18,10 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "wine/winnet16.h" diff --git a/dlls/version/resource.c b/dlls/version/resource.c index af332da816..b2dcc6d286 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -25,7 +25,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "lzexpand.h" diff --git a/dlls/win32s/w32sys.c b/dlls/win32s/w32sys.c index a57de9c8b0..6b49c54d0d 100644 --- a/dlls/win32s/w32sys.c +++ b/dlls/win32s/w32sys.c @@ -19,7 +19,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "config.h" + +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "wine/windef16.h" diff --git a/dlls/winaspi/aspi.c b/dlls/winaspi/aspi.c index 5889d2c23f..f85d5c71ca 100644 --- a/dlls/winaspi/aspi.c +++ b/dlls/winaspi/aspi.c @@ -46,7 +46,9 @@ HKEY_DYN_DATA #endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/dlls/winaspi/winaspi16.c b/dlls/winaspi/winaspi16.c index 740f69a8e6..1e9c2ddd19 100644 --- a/dlls/winaspi/winaspi16.c +++ b/dlls/winaspi/winaspi16.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/dlls/winaspi/winaspi32.c b/dlls/winaspi/winaspi32.c index 7d3a33de7e..386f54d4be 100644 --- a/dlls/winaspi/winaspi32.c +++ b/dlls/winaspi/winaspi32.c @@ -26,7 +26,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "aspi.h" diff --git a/dlls/winedos/dosvm.c b/dlls/winedos/dosvm.c index 2ffe54254a..23a3b7d1d2 100644 --- a/dlls/winedos/dosvm.c +++ b/dlls/winedos/dosvm.c @@ -28,8 +28,12 @@ #include #include #include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include "wine/winbase16.h" diff --git a/dlls/winedos/int16.c b/dlls/winedos/int16.c index 2cd41ab3b9..bbd1616d77 100644 --- a/dlls/winedos/int16.c +++ b/dlls/winedos/int16.c @@ -23,7 +23,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "module.h" #include "dosexe.h" diff --git a/dlls/winedos/module.c b/dlls/winedos/module.c index b55d50be84..aafde811ad 100644 --- a/dlls/winedos/module.c +++ b/dlls/winedos/module.c @@ -29,10 +29,14 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include "windef.h" #include "wine/winbase16.h" #include "wingdi.h" diff --git a/dlls/winedos/xms.c b/dlls/winedos/xms.c index fc03cb67a9..0b99736003 100644 --- a/dlls/winedos/xms.c +++ b/dlls/winedos/xms.c @@ -20,7 +20,11 @@ * Note: This XMS emulation is hooked through the DPMI interrupt. */ -#include +#include "config.h" + +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winbase.h" #include "wine/winbase16.h" diff --git a/dlls/wineps/init.c b/dlls/wineps/init.c index 210d1d752d..9888e5b582 100644 --- a/dlls/wineps/init.c +++ b/dlls/wineps/init.c @@ -22,7 +22,9 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "gdi.h" #include "psdrv.h" diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 623a901f8d..18cdf625be 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -34,7 +34,9 @@ #ifdef HAVE_SYS_SOCKET_H # include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winbase.h" diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 9f77002443..ee20218c22 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -30,7 +30,9 @@ #endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 50b2f23f7e..e12b4e5cd5 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -32,10 +32,14 @@ #ifdef HAVE_SYS_SOCKET_H # include #endif -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index e7e4ba6869..43b6b9d226 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -23,7 +23,9 @@ #include "config.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/winmm/joystick/joystick.c b/dlls/winmm/joystick/joystick.c index fef5b78961..5c5bbdf572 100644 --- a/dlls/winmm/joystick/joystick.c +++ b/dlls/winmm/joystick/joystick.c @@ -39,7 +39,9 @@ #include "config.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/winmm/time.c b/dlls/winmm/time.c index 192140eacc..efe266599d 100644 --- a/dlls/winmm/time.c +++ b/dlls/winmm/time.c @@ -24,8 +24,12 @@ #include "wine/port.h" #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include "mmsystem.h" #include "windef.h" diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c index f6d9e1e5f4..743fad44f5 100644 --- a/dlls/winmm/winealsa/audio.c +++ b/dlls/winmm/winealsa/audio.c @@ -27,7 +27,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/winmm/winealsa/audio_05.c b/dlls/winmm/winealsa/audio_05.c index deb2e2151d..a5507ebaae 100644 --- a/dlls/winmm/winealsa/audio_05.c +++ b/dlls/winmm/winealsa/audio_05.c @@ -26,7 +26,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #ifdef HAVE_SYS_IOCTL_H diff --git a/dlls/winmm/winearts/audio.c b/dlls/winmm/winearts/audio.c index ce3c31f3d6..ca822fc65f 100644 --- a/dlls/winmm/winearts/audio.c +++ b/dlls/winmm/winearts/audio.c @@ -43,7 +43,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include "windef.h" diff --git a/dlls/winmm/wineaudioio/audio.c b/dlls/winmm/wineaudioio/audio.c index 5afa9f488c..4238f90a36 100644 --- a/dlls/winmm/wineaudioio/audio.c +++ b/dlls/winmm/wineaudioio/audio.c @@ -42,7 +42,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #ifdef HAVE_SYS_IOCTL_H diff --git a/dlls/winmm/winenas/audio.c b/dlls/winmm/winenas/audio.c index c6f51e3f17..8d90a09a84 100644 --- a/dlls/winmm/winenas/audio.c +++ b/dlls/winmm/winenas/audio.c @@ -39,8 +39,12 @@ #include #include #include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c index 1c7ece57aa..733575549a 100644 --- a/dlls/winmm/wineoss/audio.c +++ b/dlls/winmm/wineoss/audio.c @@ -34,7 +34,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #ifdef HAVE_SYS_IOCTL_H diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c index 0c3dc9d4a2..b837a1c0f5 100644 --- a/dlls/winmm/wineoss/midi.c +++ b/dlls/winmm/wineoss/midi.c @@ -29,7 +29,9 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_IOCTL_H # include diff --git a/dlls/winmm/wineoss/mixer.c b/dlls/winmm/wineoss/mixer.c index 6ef828dfe1..1e3f32e5fa 100644 --- a/dlls/winmm/wineoss/mixer.c +++ b/dlls/winmm/wineoss/mixer.c @@ -26,7 +26,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/dlls/winmm/wineoss/mmaux.c b/dlls/winmm/wineoss/mmaux.c index d2b987b55a..4d2f9f2553 100644 --- a/dlls/winmm/wineoss/mmaux.c +++ b/dlls/winmm/wineoss/mmaux.c @@ -25,7 +25,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_IOCTL_H # include diff --git a/dlls/winsock/async.c b/dlls/winsock/async.c index 29629e739d..15239cabc0 100644 --- a/dlls/winsock/async.c +++ b/dlls/winsock/async.c @@ -86,7 +86,9 @@ #ifdef HAVE_NETDB_H #include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_ARPA_NAMESER_H # include diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c index bdb6c6e3c1..2e0cefd97b 100644 --- a/dlls/winsock/socket.c +++ b/dlls/winsock/socket.c @@ -78,7 +78,9 @@ #ifdef HAVE_NETDB_H #include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_ARPA_NAMESER_H # include diff --git a/dlls/wsock32/socket.c b/dlls/wsock32/socket.c index 53efd45f80..611151dd93 100644 --- a/dlls/wsock32/socket.c +++ b/dlls/wsock32/socket.c @@ -48,7 +48,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_SYS_IOCTL_H # include #endif diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c index dd0b954ce9..e7793ff2cd 100644 --- a/dlls/x11drv/clipboard.c +++ b/dlls/x11drv/clipboard.c @@ -64,7 +64,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "ts_xlib.h" diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index 6ed31632c5..10a62dfbfe 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -25,8 +25,12 @@ #include #include #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "ts_xlib.h" #include "ts_xutil.h" diff --git a/files/change.c b/files/change.c index 55477cd96c..18c619fc60 100644 --- a/files/change.c +++ b/files/change.c @@ -23,9 +23,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include "winbase.h" diff --git a/files/directory.c b/files/directory.c index 9cd2147804..9e3f3cd2cb 100644 --- a/files/directory.c +++ b/files/directory.c @@ -26,7 +26,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_ERRNO_H #include diff --git a/files/dos_fs.c b/files/dos_fs.c index da71ae23dd..3b0abea270 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -36,7 +36,9 @@ #include #endif #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winerror.h" diff --git a/files/drive.c b/files/drive.c index 37da65e370..94e151e1b8 100644 --- a/files/drive.c +++ b/files/drive.c @@ -35,7 +35,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_SYS_PARAM_H # include diff --git a/files/file.c b/files/file.c index 99bbb49065..64b78b31cf 100644 --- a/files/file.c +++ b/files/file.c @@ -41,10 +41,14 @@ #ifdef HAVE_SYS_MMAN_H #include #endif -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winerror.h" diff --git a/files/profile.c b/files/profile.c index 3b6084339e..8f342a26ad 100644 --- a/files/profile.c +++ b/files/profile.c @@ -32,7 +32,9 @@ #ifdef HAVE_PWD_H # include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/files/smb.c b/files/smb.c index 16825c1450..b84096dff8 100644 --- a/files/smb.c +++ b/files/smb.c @@ -71,10 +71,14 @@ #ifdef HAVE_SYS_MMAN_H #include #endif -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_SOCKET_H # include diff --git a/graphics/x11drv/xfont.c b/graphics/x11drv/xfont.c index 2c53a25dfa..6d404a25fe 100644 --- a/graphics/x11drv/xfont.c +++ b/graphics/x11drv/xfont.c @@ -32,7 +32,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/loader/main.c b/loader/main.c index b54271ff1e..88b2171761 100644 --- a/loader/main.c +++ b/loader/main.c @@ -18,12 +18,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #ifdef MALLOC_DEBUGGING diff --git a/loader/module.c b/loader/module.c index 637c69373f..e291b0d461 100644 --- a/loader/module.c +++ b/loader/module.c @@ -18,13 +18,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "wine/winbase16.h" #include "winerror.h" #include "heap.h" diff --git a/loader/ne/module.c b/loader/ne/module.c index 4f8b37a2f5..8947e26148 100644 --- a/loader/ne/module.c +++ b/loader/ne/module.c @@ -25,7 +25,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winbase.h" diff --git a/loader/ne/resource.c b/loader/ne/resource.c index 57118d7db3..b12409c334 100644 --- a/loader/ne/resource.c +++ b/loader/ne/resource.c @@ -28,7 +28,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "wine/winbase16.h" diff --git a/loader/ne/segment.c b/loader/ne/segment.c index 198576fb74..365e286b09 100644 --- a/loader/ne/segment.c +++ b/loader/ne/segment.c @@ -19,12 +19,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/loader/resource.c b/loader/resource.c index 5d778798a2..a4a5e610a7 100644 --- a/loader/resource.c +++ b/loader/resource.c @@ -19,13 +19,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" #include "wine/winbase16.h" diff --git a/loader/task.c b/loader/task.c index 6e5b247511..6a1dfee2ed 100644 --- a/loader/task.c +++ b/loader/task.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "wingdi.h" diff --git a/memory/global.c b/memory/global.c index 9cfe90a228..7f143cfc40 100644 --- a/memory/global.c +++ b/memory/global.c @@ -26,7 +26,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #ifdef HAVE_SYS_PARAM_H #include diff --git a/memory/registry.c b/memory/registry.c index 33e49aa22f..ed1b5f0a7f 100644 --- a/memory/registry.c +++ b/memory/registry.c @@ -26,9 +26,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "winreg.h" diff --git a/memory/virtual.c b/memory/virtual.c index d3583c4fea..239f6c1fdd 100644 --- a/memory/virtual.c +++ b/memory/virtual.c @@ -27,7 +27,9 @@ #include #endif #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/misc/main.c b/misc/main.c index 018869cbaa..548eb6beba 100644 --- a/misc/main.c +++ b/misc/main.c @@ -26,8 +26,12 @@ #include #include #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/misc/registry.c b/misc/registry.c index b83841946c..093d636737 100644 --- a/misc/registry.c +++ b/misc/registry.c @@ -39,7 +39,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/msdos/dosconf.c b/msdos/dosconf.c index 9612711084..f2978948e2 100644 --- a/msdos/dosconf.c +++ b/msdos/dosconf.c @@ -21,7 +21,9 @@ #include "config.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/msdos/dpmi.c b/msdos/dpmi.c index 6ea5340ce7..db19b5211a 100644 --- a/msdos/dpmi.c +++ b/msdos/dpmi.c @@ -21,7 +21,9 @@ #include "config.h" #include "wine/port.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "windef.h" diff --git a/msdos/int13.c b/msdos/int13.c index 76c6f06c4f..dba23a39de 100644 --- a/msdos/int13.c +++ b/msdos/int13.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "winioctl.h" diff --git a/msdos/int1a.c b/msdos/int1a.c index 3c4a10d27a..262cba8250 100644 --- a/msdos/int1a.c +++ b/msdos/int1a.c @@ -18,8 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include "miscemu.h" #include "wine/debug.h" diff --git a/msdos/int21.c b/msdos/int21.c index 9e4b37c35b..c35128705d 100644 --- a/msdos/int21.c +++ b/msdos/int21.c @@ -33,9 +33,13 @@ # include #endif #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include "windef.h" diff --git a/msdos/int25.c b/msdos/int25.c index 82c54c1864..74372ce0e1 100644 --- a/msdos/int25.c +++ b/msdos/int25.c @@ -18,10 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "msdos.h" #include "miscemu.h" #include "drive.h" diff --git a/msdos/int26.c b/msdos/int26.c index 3a473c4c77..8e09e338b2 100644 --- a/msdos/int26.c +++ b/msdos/int26.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "msdos.h" #include "miscemu.h" #include "drive.h" diff --git a/msdos/ioports.c b/msdos/ioports.c index bb6b798ddd..3a36ce345d 100644 --- a/msdos/ioports.c +++ b/msdos/ioports.c @@ -32,7 +32,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "callback.h" #include "file.h" diff --git a/msdos/vxd.c b/msdos/vxd.c index 5b6dc1376d..67db926997 100644 --- a/msdos/vxd.c +++ b/msdos/vxd.c @@ -18,10 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "windef.h" #include "ntddk.h" diff --git a/scheduler/client.c b/scheduler/client.c index c5379aa384..7ceb8ca081 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -44,7 +44,9 @@ #endif #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "thread.h" diff --git a/scheduler/handle.c b/scheduler/handle.c index 683e574bd1..e24f0e2cda 100644 --- a/scheduler/handle.c +++ b/scheduler/handle.c @@ -18,9 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "winbase.h" #include "wine/server.h" #include "winerror.h" diff --git a/scheduler/process.c b/scheduler/process.c index 2aacce8d3b..b3efdff8f0 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -29,7 +29,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "wine/winbase16.h" #include "wine/winuser16.h" #include "wine/exception.h" diff --git a/scheduler/pthread.c b/scheduler/pthread.c index ffa694743f..e29b7b3e64 100644 --- a/scheduler/pthread.c +++ b/scheduler/pthread.c @@ -29,7 +29,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "winbase.h" diff --git a/scheduler/synchro.c b/scheduler/synchro.c index 41788dc631..f8b60fe574 100644 --- a/scheduler/synchro.c +++ b/scheduler/synchro.c @@ -18,12 +18,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "file.h" /* for DOSFS_UnixTimeToFileTime */ diff --git a/scheduler/sysdeps.c b/scheduler/sysdeps.c index 06170dbb07..f00b4fd9f1 100644 --- a/scheduler/sysdeps.c +++ b/scheduler/sysdeps.c @@ -23,8 +23,12 @@ #include #include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #ifdef HAVE_SYS_SYSCALL_H # include #endif diff --git a/scheduler/syslevel.c b/scheduler/syslevel.c index feb3a9b526..974650d072 100644 --- a/scheduler/syslevel.c +++ b/scheduler/syslevel.c @@ -18,7 +18,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "config.h" + +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "ntddk.h" #include "syslevel.h" diff --git a/scheduler/thread.c b/scheduler/thread.c index 0a71d050c6..574324c0fb 100644 --- a/scheduler/thread.c +++ b/scheduler/thread.c @@ -27,7 +27,9 @@ #ifdef HAVE_SYS_MMAN_H #include #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "wine/winbase16.h" #include "thread.h" #include "task.h" diff --git a/win32/device.c b/win32/device.c index 662f3ab418..8da2d72f40 100644 --- a/win32/device.c +++ b/win32/device.c @@ -24,7 +24,9 @@ #include "wine/port.h" #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/win32/init.c b/win32/init.c index f7c05bdeac..e870a2eef7 100644 --- a/win32/init.c +++ b/win32/init.c @@ -19,8 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/win32/kernel32.c b/win32/kernel32.c index 6c3d695e0a..c12665903a 100644 --- a/win32/kernel32.c +++ b/win32/kernel32.c @@ -19,9 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" diff --git a/win32/newfns.c b/win32/newfns.c index 41d07ade18..3fceb0813f 100644 --- a/win32/newfns.c +++ b/win32/newfns.c @@ -21,10 +21,16 @@ /* Misc. new functions - they should be moved into appropriate files at a later date. */ +#include "config.h" + #include #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include "windef.h" #include "winbase.h" #include "winnls.h" diff --git a/win32/time.c b/win32/time.c index ed2840cef2..cd700bb6c2 100644 --- a/win32/time.c +++ b/win32/time.c @@ -18,10 +18,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include -#include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif #include "file.h" #include "winerror.h" #include "wine/debug.h" diff --git a/windows/clipboard.c b/windows/clipboard.c index 9927eda6a5..5c2c20de87 100644 --- a/windows/clipboard.c +++ b/windows/clipboard.c @@ -28,10 +28,14 @@ * TTY clipboard driver are available) */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include "windef.h" diff --git a/windows/message.c b/windows/message.c index f668a378d1..25d1ecd4dc 100644 --- a/windows/message.c +++ b/windows/message.c @@ -18,10 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include "winbase.h" diff --git a/windows/winhelp.c b/windows/winhelp.c index e6123ddaed..0c46dfb1ff 100644 --- a/windows/winhelp.c +++ b/windows/winhelp.c @@ -18,10 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "wine/debug.h" #include "windef.h" #include "wingdi.h" -- 2.32.0.93.g670b81a890