[RFC] [openjdk] provide milisecond modification timestamps

Andrew Hughes ahughes at redhat.com
Mon Apr 23 09:41:34 PDT 2012


----- Original Message -----
> diff -r 8ac52c85f9e9 src/solaris/native/java/io/UnixFileSystem_md.c
> --- a/src/solaris/native/java/io/UnixFileSystem_md.c	Wed Feb 23
> 15:49:19
> 2011 -0800
> +++ b/src/solaris/native/java/io/UnixFileSystem_md.c	Sat Apr 21
> 10:11:26
> 2012 +0200
> @@ -197,7 +197,10 @@
>      WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
>          struct stat64 sb;
>          if (stat64(path, &sb) == 0) {
> -            rv = 1000 * (jlong)sb.st_mtime;
> +            if(sb.st_mtimensec != 0)
> +            	rv = (jlong)sb.st_mtimensec / 1000000;
> +            else
> +                rv = 1000 * (jlong)sb.st_mtime;
>          }
>      } END_PLATFORM_STRING(env, path);
>      return rv;
> 
> 
> 

This looks a sensible improvement to me.  I can add it to the IcedTea
repository.

Have you signed the Oracle Contributor Agreement (OCA) so it can also
be upstreamed to OpenJDK?

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the distro-pkg-dev mailing list