[Keow-cvs-commits] keow/keow-kernel/KeowKernel Utils.h,1.4,1.5 sys_io.cpp,1.7,1.8
Status: Alpha
Brought to you by:
paul-sf
From: Paul <pa...@us...> - 2005-10-30 01:41:32
|
Update of /cvsroot/keow/keow/keow-kernel/KeowKernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9057/keow-kernel/KeowKernel Modified Files: Utils.h sys_io.cpp Log Message: Index: sys_io.cpp =================================================================== RCS file: /cvsroot/keow/keow/keow-kernel/KeowKernel/sys_io.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sys_io.cpp 30 Oct 2005 01:20:17 -0000 1.7 --- sys_io.cpp 30 Oct 2005 01:41:24 -0000 1.8 *************** *** 1310,1314 **** P->ReadMemory(×, (ADDR)ctx.Ecx, sizeof(times)); ! HANDLE hTmp = CreateFile(path.GetWin32Path(), FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING, 0, 0); if(hTmp==INVALID_HANDLE_VALUE) { --- 1310,1315 ---- P->ReadMemory(×, (ADDR)ctx.Ecx, sizeof(times)); ! DWORD attr = GetFileAttributes(path.GetWin32Path()); ! HANDLE hTmp = CreateFile(path.GetWin32Path(), FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING, (attr&FILE_ATTRIBUTE_DIRECTORY)?FILE_FLAG_BACKUP_SEMANTICS:0, 0); if(hTmp==INVALID_HANDLE_VALUE) { Index: Utils.h =================================================================== RCS file: /cvsroot/keow/keow/keow-kernel/KeowKernel/Utils.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Utils.h 30 Oct 2005 01:20:17 -0000 1.4 --- Utils.h 30 Oct 2005 01:41:24 -0000 1.5 *************** *** 45,50 **** extern ULARGE_INTEGER Time1Jan1970; //conversion (1sec <--> 100ns) ! #define SECOND_TO_100NS(sec) (sec)*10000000L ! #define NS100_TO_SECOND(ns) (ns)/10000000L #define FILETIME_TO_TIME_T(t) (unsigned long)(NS100_TO_SECOND( ((ULARGE_INTEGER*)&t)->QuadPart - Time1Jan1970.QuadPart )) #define TIME_T_TO_FILETIME(tt,ft) ((ULARGE_INTEGER*)&ft)->QuadPart = (Time1Jan1970.QuadPart + SECOND_TO_100NS(tt)) --- 45,50 ---- extern ULARGE_INTEGER Time1Jan1970; //conversion (1sec <--> 100ns) ! #define SECOND_TO_100NS(sec) (((unsigned __int64)sec)*10000000L) ! #define NS100_TO_SECOND(ns) (((unsigned __int64)ns)/10000000L) #define FILETIME_TO_TIME_T(t) (unsigned long)(NS100_TO_SECOND( ((ULARGE_INTEGER*)&t)->QuadPart - Time1Jan1970.QuadPart )) #define TIME_T_TO_FILETIME(tt,ft) ((ULARGE_INTEGER*)&ft)->QuadPart = (Time1Jan1970.QuadPart + SECOND_TO_100NS(tt)) |