< prev index next >

src/os/windows/vm/os_windows.cpp

Print this page
rev 10386 : imported patch 8146879.03

*** 1592,1601 **** --- 1592,1616 ---- return _vscprintf(fmt, args); } return ret; } + int os::compare_file_modified_times(const char* file1, const char* file2) { + FILETIME ft[2]; + + for (int i = 0; i < 2; i++) { + const char* file = (i == 0 ? file1 : file2); + HANDLE fhandle = CreateFile(file, GENERIC_READ, 0, NULL, + OPEN_EXISTING, 0, NULL); + BOOL ret = GetFileTime(fhandle, NULL, NULL, &ft[i]); + assert(ret, "GetFileTime for file %s failed: %d", file, GetLastError()); + CloseHandle(fhandle); + } + + return CompareFileTime(&ft[0], &ft[2]); + } + void os::print_os_info_brief(outputStream* st) { os::print_os_info(st); } void os::print_os_info(outputStream* st) {
*** 4611,4620 **** --- 4626,4638 ---- } return 0; } + int os::fileno(FILE* fp) { + return _fileno(fp); + } // This code is a copy of JDK's sysSync // from src/windows/hpi/src/sys_api_md.c // except for the legacy workaround for a bug in Win 98
< prev index next >