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 f3df7b00250..b26d828362b 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 e24bb3f892f..68b946bfb79 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 61f5fb62676..c63456553de 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 ddbee96858d..5c2dac98600 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 79d2e3aaa10..46ea8dcf521 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 f70cc9e3b66..679709f548d 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 cce69d6328f..5e2552ca01b 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 533402bd3f2..e7fc8352d6c 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 10d1a879ee4..f6012b9345d 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 cdc303468af..c6e7013447d 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 61b294d10a0..3b7a5cd98f2 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 358a6cc8609..2cc6ac32608 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 a352888ce76..a0b867cb6c5 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 0ae8f4cb55e..15ac5a58c36 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 d401f85ad1e..28c7256fc59 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 8fd1882217f..80f56150ed6 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 3bcb4414399..ae3b2f1f029 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 223801270ed..0788ffe80fd 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 0048edfe6e0..62b80cc50f9 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 676f7b9f6c4..3a2fb0d06df 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 2f604bbdc02..01e0c07561e 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 f128d650979..0602cd94907 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 a9a2a89a0e5..4a872f46b6a 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 8de75c65698..f09b52ad059 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 c830f103395..07e1b6506d5 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 3b91f736e71..c369d231467 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 c5ff3eefa65..ba59d589d1a 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 c10cf531eed..9cf808d2f38 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 d79968e7add..1439715fb79 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 56f65232dec..be876c89be4 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 cef57ae534a..f97dd3874a5 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 4200d583791..f21bb01d815 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 66f49cf0b1b..250f617a56a 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 c07cabeb5ae..218c03375e2 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 2cfc5aeef8f..2a22166fa7a 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 d3bd40fc72a..117f160539c 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 735134f6342..27b60bd9dce 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 bd7b9d653be..7bafdddf1ba 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 5cb71e884e6..a380482a402 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 e6c304321db..55d4b045e99 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 0014a5695aa..53010785f74 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 84ea9254bda..6bd0ae58e4d 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 4dd351541e4..bc6841a539a 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 bcc706351a3..4444bc77d7e 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 adf55a63772..91854181b11 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 af332da816d..b2dcc6d2865 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 a57de9c8b0e..6b49c54d0da 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 5889d2c23f0..f85d5c71ca7 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 740f69a8e68..1e9c2ddd19f 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 7d3a33de7e8..386f54d4bef 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 2ffe54254ad..23a3b7d1d20 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 2cd41ab3b9c..bbd1616d771 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 b55d50be841..aafde811add 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 fc03cb67a92..0b997360035 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 210d1d752db..9888e5b582f 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 623a901f8d7..18cdf625be6 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 9f770024437..ee20218c22e 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 50b2f23f7e5..e12b4e5cd55 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 e7e4ba6869c..43b6b9d226f 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 fef5b78961f..5c5bbdf5728 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 192140eacc5..efe266599d7 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 f6d9e1e5f47..743fad44f52 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 deb2e2151d8..a5507ebaae9 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 ce3c31f3d65..ca822fc65fb 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 5afa9f488c8..4238f90a36b 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 c6f51e3f17d..8d90a09a846 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 1c7ece57aa8..733575549a7 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 0c3dc9d4a22..b837a1c0f56 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 6ef828dfe1d..1e3f32e5fa7 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 d2b987b55aa..4d2f9f2553b 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 29629e739d5..15239cabc06 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 bdb6c6e3c16..2e0cefd97ba 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 53efd45f801..611151dd931 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 dd0b954ce92..e7793ff2cd3 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 6ed31632c5c..10a62dfbfee 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 55477cd96c6..18c619fc603 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 9cd2147804d..9e3f3cd2cb1 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 da71ae23ddb..3b0abea2709 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 37da65e370b..94e151e1b8d 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 99bbb490654..64b78b31cf3 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 3b6084339e2..8f342a26adf 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 16825c14503..b84096dff85 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 2c53a25dfa2..6d404a25fe9 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 b54271ff1e3..88b2171761a 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 637c69373f7..e291b0d4611 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 4f8b37a2f54..8947e261486 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 57118d7db34..b12409c334f 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 198576fb740..365e286b09f 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 5d778798a2a..a4a5e610a78 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 6e5b2475111..6a1dfee2edd 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 9cfe90a2285..7f143cfc403 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 33e49aa22fe..ed1b5f0a7f5 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 d3583c4fead..239f6c1fdd8 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 018869cbaa5..548eb6beba4 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 b83841946c9..093d636737e 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 96127110846..f2978948e22 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 6ea5340ce7a..db19b5211a2 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 76c6f06c4fb..dba23a39de4 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 3c4a10d27aa..262cba82508 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 9e4b37c35b5..c35128705da 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 82c54c18644..74372ce0e1c 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 3a473c4c773..8e09e338b2b 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 bb6b798dddf..3a36ce345df 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 5b6dc1376d3..67db9269975 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 c5379aa384c..7ceb8ca0819 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 683e574bd1f..e24f0e2cdab 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 2aacce8d3bd..b3efdff8f0a 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 ffa694743fb..e29b7b3e645 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 41788dc6315..f8b60fe574d 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 06170dbb07a..f00b4fd9f12 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 feb3a9b5264..974650d0729 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 0a71d050c66..574324c0fb8 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 662f3ab4186..8da2d72f403 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 f7c05bdeac7..e870a2eef77 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 6c3d695e0af..c12665903af 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 41d07ade187..3fceb0813fe 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 ed2840cef20..cd700bb6c2d 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 9927eda6a56..5c2c20de876 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 f668a378d12..25d1ecd4dc3 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 e6123ddaed3..0c46dfb1ff3 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.11.4.GIT