8180519: Windows FILETIME should be converted to and from ULARGE_INTEGER not LARGE_INTEGER
Summary: Change LARGE_INTEGER to ULARGE_INTEGER for FILETIMEs used with the GetFileTime() and SetFileTime() functions.
Reviewed-by: rriggs
--- a/jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c Wed Jul 05 23:27:00 2017 +0200
+++ b/jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c Thu May 18 10:22:55 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -472,7 +472,7 @@
jobject file)
{
jlong rv = 0;
- LARGE_INTEGER modTime;
+ ULARGE_INTEGER modTime;
FILETIME t;
HANDLE h;
WCHAR *pathbuf = fileToNTPath(env, file, ids.path);
@@ -784,7 +784,7 @@
FILE_FLAG_BACKUP_SEMANTICS,
0);
if (h != INVALID_HANDLE_VALUE) {
- LARGE_INTEGER modTime;
+ ULARGE_INTEGER modTime;
FILETIME t;
modTime.QuadPart = (time + 11644473600000L) * 10000L;
t.dwLowDateTime = (DWORD)modTime.LowPart;