8180519: Windows FILETIME should be converted to and from ULARGE_INTEGER not LARGE_INTEGER
authorbpb
Thu, 18 May 2017 10:22:55 -0700
changeset 45175 4468d97d77fc
parent 45093 c42dc7b58b4d
child 45177 5b45993a4340
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
jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c
--- 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;