Fixed warnings caused by new winternl.h.

This commit is contained in:
Alexandre Julliard 2002-09-12 22:28:01 +00:00
parent e54fdf2142
commit 1668870f38
7 changed files with 32 additions and 29 deletions

View File

@ -51,11 +51,11 @@ static void msvcrt_fttofd(LPWIN32_FIND_DATAA fd, struct _finddata_t* ft)
else
ft->attrib = fd->dwFileAttributes;
RtlTimeToSecondsSince1970( &fd->ftCreationTime, &dw );
RtlTimeToSecondsSince1970( (LARGE_INTEGER *)&fd->ftCreationTime, &dw );
ft->time_create = dw;
RtlTimeToSecondsSince1970( &fd->ftLastAccessTime, &dw );
RtlTimeToSecondsSince1970( (LARGE_INTEGER *)&fd->ftLastAccessTime, &dw );
ft->time_access = dw;
RtlTimeToSecondsSince1970( &fd->ftLastWriteTime, &dw );
RtlTimeToSecondsSince1970( (LARGE_INTEGER *)&fd->ftLastWriteTime, &dw );
ft->time_write = dw;
ft->size = fd->nFileSizeLow;
strcpy(ft->name, fd->cFileName);
@ -71,11 +71,11 @@ static void msvcrt_wfttofd(LPWIN32_FIND_DATAW fd, struct _wfinddata_t* ft)
else
ft->attrib = fd->dwFileAttributes;
RtlTimeToSecondsSince1970( &fd->ftCreationTime, &dw );
RtlTimeToSecondsSince1970( (LARGE_INTEGER *)&fd->ftCreationTime, &dw );
ft->time_create = dw;
RtlTimeToSecondsSince1970( &fd->ftLastAccessTime, &dw );
RtlTimeToSecondsSince1970( (LARGE_INTEGER *)&fd->ftLastAccessTime, &dw );
ft->time_access = dw;
RtlTimeToSecondsSince1970( &fd->ftLastWriteTime, &dw );
RtlTimeToSecondsSince1970( (LARGE_INTEGER *)&fd->ftLastWriteTime, &dw );
ft->time_write = dw;
ft->size = fd->nFileSizeLow;
strcpyW(ft->name, fd->cFileName);

View File

@ -700,9 +700,9 @@ int MSVCRT__fstat(int fd, struct _stat* buf)
FIXME(":dwFileAttributes = %ld, mode set to 0\n",hfi.dwFileAttributes);
buf->st_nlink = hfi.nNumberOfLinks;
buf->st_size = hfi.nFileSizeLow;
RtlTimeToSecondsSince1970(&hfi.ftLastAccessTime, &dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastAccessTime, &dw);
buf->st_atime = dw;
RtlTimeToSecondsSince1970(&hfi.ftLastWriteTime, &dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw;
return 0;
}
@ -719,16 +719,16 @@ int _futime(int fd, struct _utimbuf *t)
{
MSVCRT_time_t currTime;
MSVCRT_time(&currTime);
RtlSecondsSince1970ToTime(currTime, &at);
RtlSecondsSince1970ToTime(currTime, (LARGE_INTEGER *)&at);
memcpy(&wt, &at, sizeof(wt));
}
else
{
RtlSecondsSince1970ToTime(t->actime, &at);
RtlSecondsSince1970ToTime(t->actime, (LARGE_INTEGER *)&at);
if (t->actime == t->modtime)
memcpy(&wt, &at, sizeof(wt));
else
RtlSecondsSince1970ToTime(t->modtime, &wt);
RtlSecondsSince1970ToTime(t->modtime, (LARGE_INTEGER *)&wt);
}
if (!SetFileTime(hand, NULL, &at, &wt))
@ -1190,9 +1190,9 @@ int MSVCRT__stat(const char* path, struct _stat * buf)
buf->st_mode = mode;
buf->st_nlink = 1;
buf->st_size = hfi.nFileSizeLow;
RtlTimeToSecondsSince1970(&hfi.ftLastAccessTime, &dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastAccessTime, &dw);
buf->st_atime = dw;
RtlTimeToSecondsSince1970(&hfi.ftLastWriteTime, &dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw;
TRACE("\n%d %d %d %ld %ld %ld\n", buf->st_mode,buf->st_nlink,buf->st_size,
buf->st_atime,buf->st_mtime, buf->st_ctime);
@ -1251,9 +1251,9 @@ int _wstat(const WCHAR* path, struct _stat * buf)
buf->st_mode = mode;
buf->st_nlink = 1;
buf->st_size = hfi.nFileSizeLow;
RtlTimeToSecondsSince1970(&hfi.ftLastAccessTime, &dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastAccessTime, &dw);
buf->st_atime = dw;
RtlTimeToSecondsSince1970(&hfi.ftLastWriteTime, &dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw;
TRACE("\n%d %d %d %ld %ld %ld\n", buf->st_mode,buf->st_nlink,buf->st_size,
buf->st_atime,buf->st_mtime, buf->st_ctime);

View File

@ -189,7 +189,7 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
{
LARGE_INTEGER modif;
RtlSecondsSince1970ToTime( reply->modif, (FILETIME *)&modif );
RtlSecondsSince1970ToTime( reply->modif, &modif );
switch(info_class)
{

View File

@ -387,10 +387,10 @@ STORAGE_dump_pps_entry(struct storage_pps_entry *stde) {
if (stde->pps_type !=2) {
time_t t;
DWORD dw;
RtlTimeToSecondsSince1970(&(stde->pps_ft1),&dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&(stde->pps_ft1),&dw);
t = dw;
DPRINTF("ts1: %s\n",ctime(&t));
RtlTimeToSecondsSince1970(&(stde->pps_ft2),&dw);
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&(stde->pps_ft2),&dw);
t = dw;
DPRINTF("ts2: %s\n",ctime(&t));
}

View File

@ -1702,9 +1702,9 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAW *entry )
{
if (info->cur_pos) return 0;
entry->dwFileAttributes = FILE_ATTRIBUTE_LABEL;
RtlSecondsSince1970ToTime( (time_t)0, &entry->ftCreationTime );
RtlSecondsSince1970ToTime( (time_t)0, &entry->ftLastAccessTime );
RtlSecondsSince1970ToTime( (time_t)0, &entry->ftLastWriteTime );
RtlSecondsSince1970ToTime( (time_t)0, (LARGE_INTEGER *)&entry->ftCreationTime );
RtlSecondsSince1970ToTime( (time_t)0, (LARGE_INTEGER *)&entry->ftLastAccessTime );
RtlSecondsSince1970ToTime( (time_t)0, (LARGE_INTEGER *)&entry->ftLastWriteTime );
entry->nFileSizeHigh = 0;
entry->nFileSizeLow = 0;
entry->dwReserved0 = 0;
@ -2435,12 +2435,12 @@ BOOL WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft)
newtm.tm_mon = ((fatdate >> 5) & 0x0f) - 1;
newtm.tm_year = (fatdate >> 9) + 80;
#ifdef HAVE_TIMEGM
RtlSecondsSince1970ToTime( timegm(&newtm), ft );
RtlSecondsSince1970ToTime( timegm(&newtm), (LARGE_INTEGER *)ft );
#else
time1 = mktime(&newtm);
gtm = gmtime(&time1);
time2 = mktime(gtm);
RtlSecondsSince1970ToTime( 2*time1-time2, ft );
RtlSecondsSince1970ToTime( 2*time1-time2, (LARGE_INTEGER *)ft );
#endif
return TRUE;
}

View File

@ -711,9 +711,9 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
if (!(st->st_mode & S_IWUSR))
info->dwFileAttributes |= FILE_ATTRIBUTE_READONLY;
RtlSecondsSince1970ToTime( st->st_mtime, &info->ftCreationTime );
RtlSecondsSince1970ToTime( st->st_mtime, &info->ftLastWriteTime );
RtlSecondsSince1970ToTime( st->st_atime, &info->ftLastAccessTime );
RtlSecondsSince1970ToTime( st->st_mtime, (LARGE_INTEGER *)&info->ftCreationTime );
RtlSecondsSince1970ToTime( st->st_mtime, (LARGE_INTEGER *)&info->ftLastWriteTime );
RtlSecondsSince1970ToTime( st->st_atime, (LARGE_INTEGER *)&info->ftLastAccessTime );
info->dwVolumeSerialNumber = 0; /* FIXME */
info->nFileSizeHigh = 0;
@ -782,9 +782,9 @@ DWORD WINAPI GetFileInformationByHandle( HANDLE hFile,
* MSDN q234741.txt */
if ((reply->type == FILE_TYPE_DISK) || (reply->type == FILE_TYPE_REMOTE))
{
RtlSecondsSince1970ToTime( reply->write_time, &info->ftCreationTime );
RtlSecondsSince1970ToTime( reply->write_time, &info->ftLastWriteTime );
RtlSecondsSince1970ToTime( reply->access_time, &info->ftLastAccessTime );
RtlSecondsSince1970ToTime( reply->write_time, (LARGE_INTEGER *)&info->ftCreationTime );
RtlSecondsSince1970ToTime( reply->write_time, (LARGE_INTEGER *)&info->ftLastWriteTime );
RtlSecondsSince1970ToTime( reply->access_time, (LARGE_INTEGER *)&info->ftLastAccessTime );
info->dwFileAttributes = reply->attr;
info->dwVolumeSerialNumber = reply->serial;
info->nFileSizeHigh = reply->size_high;

View File

@ -34,6 +34,9 @@
# include <X11/extensions/XShm.h>
#endif /* defined(HAVE_LIBXXSHM) */
#undef Status /* avoid conflict with wintrnl.h */
typedef int Status;
#include "windef.h"
#include "winbase.h"
#include "gdi.h"