Date: Thu, 27 Dec 2018 09:46:45 +0000 (UTC) From: Alex Dupre <ale@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r488521 - in head/java/openjdk8: . files Message-ID: <201812270946.wBR9kjIJ078254@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ale Date: Thu Dec 27 09:46:44 2018 New Revision: 488521 URL: https://svnweb.freebsd.org/changeset/ports/488521 Log: Add support for millisecond resolution to get/setLastModifiedTime in both Java IO and NIO. Added: head/java/openjdk8/files/patch-jdk-src-solaris-native-java-io-UnixFileSystem_md.c (contents, props changed) head/java/openjdk8/files/patch-jdk-src-solaris-native-sun-nio-fs-UnixNativeDispatcher.c (contents, props changed) Modified: head/java/openjdk8/Makefile Modified: head/java/openjdk8/Makefile ============================================================================== --- head/java/openjdk8/Makefile Thu Dec 27 09:32:54 2018 (r488520) +++ head/java/openjdk8/Makefile Thu Dec 27 09:46:44 2018 (r488521) @@ -2,7 +2,7 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= java devel MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${DIST_BUILD_NUMBER}/:jdk \ https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \ Added: head/java/openjdk8/files/patch-jdk-src-solaris-native-java-io-UnixFileSystem_md.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/openjdk8/files/patch-jdk-src-solaris-native-java-io-UnixFileSystem_md.c Thu Dec 27 09:46:44 2018 (r488521) @@ -0,0 +1,23 @@ +--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c.orig 2018-12-12 23:07:51.229721000 +0100 ++++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2018-12-12 23:12:21.847169000 +0100 +@@ -208,7 +208,8 @@ + WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) { + struct stat64 sb; + if (stat64(path, &sb) == 0) { +- rv = 1000 * (jlong)sb.st_mtime; ++ rv = (jlong)sb.st_mtim.tv_sec * 1000; ++ rv += (jlong)sb.st_mtim.tv_nsec / 1000000; + } + } END_PLATFORM_STRING(env, path); + return rv; +@@ -392,8 +393,8 @@ + struct timeval tv[2]; + + /* Preserve access time */ +- tv[0].tv_sec = sb.st_atime; +- tv[0].tv_usec = 0; ++ tv[0].tv_sec = sb.st_atim.tv_sec; ++ tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; + + /* Change last-modified time */ + tv[1].tv_sec = time / 1000; Added: head/java/openjdk8/files/patch-jdk-src-solaris-native-sun-nio-fs-UnixNativeDispatcher.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/openjdk8/files/patch-jdk-src-solaris-native-sun-nio-fs-UnixNativeDispatcher.c Thu Dec 27 09:46:44 2018 (r488521) @@ -0,0 +1,11 @@ +--- ./jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c.orig 2018-12-13 10:02:37.501082000 +0100 ++++ ./jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c 2018-12-13 10:06:26.825382000 +0100 +@@ -453,7 +453,7 @@ + (*env)->SetLongField(env, attrs, attrs_st_birthtime_sec, (jlong)buf->st_birthtime); + #endif + +-#if (_POSIX_C_SOURCE >= 200809L) || defined(__solaris__) ++#if (_POSIX_C_SOURCE >= 200809L) || defined(__solaris__) || defined(__FreeBSD__) + (*env)->SetLongField(env, attrs, attrs_st_atime_nsec, (jlong)buf->st_atim.tv_nsec); + (*env)->SetLongField(env, attrs, attrs_st_mtime_nsec, (jlong)buf->st_mtim.tv_nsec); + (*env)->SetLongField(env, attrs, attrs_st_ctime_nsec, (jlong)buf->st_ctim.tv_nsec);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812270946.wBR9kjIJ078254>