diff --git a/configure b/configure index 17b86a327ee..bbb4eaa125c 100755 --- a/configure +++ b/configure @@ -11909,6 +11909,9 @@ done + + + @@ -11958,6 +11961,7 @@ for ac_header in \ sys/mount.h \ sys/msg.h \ sys/param.h \ + sys/poll.h \ sys/ptrace.h \ sys/reg.h \ sys/shm.h \ @@ -11969,6 +11973,7 @@ for ac_header in \ sys/syscall.h \ sys/sysctl.h \ sys/time.h \ + sys/times.h \ sys/user.h \ sys/v86.h \ sys/v86intr.h \ @@ -11979,6 +11984,7 @@ for ac_header in \ termios.h \ ucontext.h \ unistd.h \ + utime.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/configure.ac b/configure.ac index cf686c836c6..a9db1214497 100644 --- a/configure.ac +++ b/configure.ac @@ -989,6 +989,7 @@ AC_CHECK_HEADERS(\ sys/mount.h \ sys/msg.h \ sys/param.h \ + sys/poll.h \ sys/ptrace.h \ sys/reg.h \ sys/shm.h \ @@ -1000,6 +1001,7 @@ AC_CHECK_HEADERS(\ sys/syscall.h \ sys/sysctl.h \ sys/time.h \ + sys/times.h \ sys/user.h \ sys/v86.h \ sys/v86intr.h \ @@ -1010,6 +1012,7 @@ AC_CHECK_HEADERS(\ termios.h \ ucontext.h \ unistd.h \ + utime.h \ ) AC_HEADER_STAT() diff --git a/dlls/kernel/comm.c b/dlls/kernel/comm.c index ae3b2f1f029..f990a2cae48 100644 --- a/dlls/kernel/comm.c +++ b/dlls/kernel/comm.c @@ -74,7 +74,9 @@ #ifdef HAVE_UNISTD_H # include #endif -#include +#ifdef HAVE_SYS_POOL_H +# include +#endif #ifdef HAVE_SYS_MODEM_H # include #endif @@ -2095,4 +2097,3 @@ BOOL WINAPI GetDefaultCommConfigW( } return ret; } - diff --git a/dlls/kernel/time.c b/dlls/kernel/time.c index 01e0c07561e..a4c5821aa62 100644 --- a/dlls/kernel/time.c +++ b/dlls/kernel/time.c @@ -28,7 +28,9 @@ #ifdef HAVE_SYS_TIME_H # include #endif -#include +#ifdef HAVE_SYS_TIMES_H +# include +#endif #include "file.h" #include "ntddk.h" #include "winerror.h" @@ -766,4 +768,3 @@ int WINAPI SetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType, LPCWST Locale, Calendar, CalType, debugstr_w(lpCalData)); return 0; } - diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 38d2ec26c48..963efed81db 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -21,8 +21,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include -#include +#ifdef HAVE_SYS_TIMES_H +# include +#endif #include "msvcrt.h" #include "msvcrt/sys/timeb.h" diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index ba59d589d1a..223afcb19d1 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -21,10 +21,14 @@ */ #include "config.h" +#include "wine/port.h" #include #include #include +#ifdef HAVE_IO_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c index 9cf808d2f38..7a1497e4c46 100644 --- a/dlls/ntdll/debugtools.c +++ b/dlls/ntdll/debugtools.c @@ -21,6 +21,9 @@ #include "config.h" #include "wine/port.h" +#include "config.h" +#include "wine/port.h" + #include #include #include diff --git a/dlls/ntdll/error.c b/dlls/ntdll/error.c index ca958d03ccd..2a5c7e837cf 100644 --- a/dlls/ntdll/error.c +++ b/dlls/ntdll/error.c @@ -32,7 +32,7 @@ struct error_table const WORD *table; }; -static const struct error_table error_table[]; +static const struct error_table error_table[12]; /************************************************************************** * RtlNtStatusToDosError (NTDLL.@) diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c index be876c89be4..dbc3899ad9f 100644 --- a/dlls/ntdll/om.c +++ b/dlls/ntdll/om.c @@ -22,6 +22,9 @@ #include #include +#ifdef HAVE_IO_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index f97dd3874a5..614768a8935 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -745,8 +745,13 @@ NTSTATUS WINAPI RtlConvertSidToUnicodeString( NTSTATUS status; ANSI_STRING AnsiStr; - struct passwd *pwd = getpwuid( getuid() ); - p = (pwd) ? pwd->pw_name : ".Default"; +#ifdef HAVE_GETPWUID + struct passwd *pwd = getpwuid( getuid() ); + p = pwd ? pwd->pw_name : NULL; +#else + p = getenv("USER"); +#endif + p = p ? p : ".Default"; FIXME("(%p %p %u)\n", String, Sid, AllocateString); diff --git a/files/file.c b/files/file.c index 64b78b31cf3..f962cec769c 100644 --- a/files/file.c +++ b/files/file.c @@ -44,12 +44,16 @@ #ifdef HAVE_SYS_TIME_H # include #endif -#include +#ifdef HAVE_SYS_POLL_H +# include +#endif #include #ifdef HAVE_UNISTD_H # include #endif -#include +#ifdef HAVE_UTIME_H +# include +#endif #include "winerror.h" #include "windef.h" diff --git a/files/smb.c b/files/smb.c index b84096dff85..9624c5e43cd 100644 --- a/files/smb.c +++ b/files/smb.c @@ -74,12 +74,16 @@ #ifdef HAVE_SYS_TIME_H # include #endif -#include +#ifdef HAVE_SYS_POLL_H +# include +#endif #include #ifdef HAVE_UNISTD_H # include #endif -#include +#ifdef HAVE_UTIME_H +# include +#endif #ifdef HAVE_SYS_SOCKET_H # include #endif diff --git a/if1632/snoop.c b/if1632/snoop.c index 2b16809b9c7..6a3108f4ef0 100644 --- a/if1632/snoop.c +++ b/if1632/snoop.c @@ -18,6 +18,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" +#include "wine/port.h" + #include #include #include diff --git a/include/config.h.in b/include/config.h.in index 61c97ef6f93..a0e545c0b99 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -497,6 +497,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_POLL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PTRACE_H @@ -533,6 +536,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSCTL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMES_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -575,6 +581,9 @@ /* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIME_H + /* Define if we have va_copy */ #undef HAVE_VA_COPY diff --git a/misc/main.c b/misc/main.c index 548eb6beba4..3137a4366c0 100644 --- a/misc/main.c +++ b/misc/main.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/misc/version.c b/misc/version.c index 0db79967c3d..414c13cba77 100644 --- a/misc/version.c +++ b/misc/version.c @@ -21,6 +21,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" +#include "wine/port.h" + #include #include #include @@ -401,7 +404,7 @@ static DWORD VERSION_GetSystemDLLVersion( HMODULE hmod ) * 5.12/5.00/5.00/4.00 Win98 calc * x.xx/5.00/5.00/4.00 win95/win98/NT4 IE5 files */ -DWORD VERSION_GetLinkedDllVersion(void) +static DWORD VERSION_GetLinkedDllVersion(void) { WINE_MODREF *wm; DWORD WinVersion = NB_WINDOWS_VERSIONS; @@ -1004,7 +1007,7 @@ void WINAPI DebugFillBuffer(LPSTR lpBuffer, WORD wBytes) * * returns TRUE if Win called with "/b" (bootlog.txt) */ -BOOL16 WINAPI DiagQuery16() +BOOL16 WINAPI DiagQuery16(void) { /* perhaps implement a Wine "/b" command line flag sometime ? */ return FALSE; diff --git a/msdos/int1a.c b/msdos/int1a.c index 262cba82508..f18d5ea1b48 100644 --- a/msdos/int1a.c +++ b/msdos/int1a.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #ifdef HAVE_SYS_TIME_H diff --git a/msdos/int21.c b/msdos/int21.c index c35128705da..cf7b3f3e309 100644 --- a/msdos/int21.c +++ b/msdos/int21.c @@ -40,7 +40,9 @@ #ifdef HAVE_UNISTD_H # include #endif -#include +#ifdef HAVE_UTIME_H +# include +#endif #include #include "windef.h" #include "winbase.h" @@ -2389,4 +2391,3 @@ FARPROC16 WINAPI GetSetKernelDOSProc16(FARPROC16 DosProc) FIXME("(DosProc=0x%08x): stub\n", (UINT)DosProc); return NULL; } - diff --git a/scheduler/synchro.c b/scheduler/synchro.c index f8b60fe574d..bbf67525eda 100644 --- a/scheduler/synchro.c +++ b/scheduler/synchro.c @@ -26,7 +26,9 @@ #ifdef HAVE_SYS_TIME_H # include #endif -#include +#ifdef HAVE_SYS_POLL_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif diff --git a/win32/time.c b/win32/time.c index cd700bb6c2d..45798ec5a00 100644 --- a/win32/time.c +++ b/win32/time.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include