Author: jilles Date: Thu Jun 9 22:14:58 2016 New Revision: 301768 URL: https://svnweb.freebsd.org/changeset/base/301768
Log: utimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2). Setting time by seconds or microseconds may cause unexpected effects especially if sysctl vfs.timestamp_precision=3 (not default). Calling the obsolete functions with NULL timestamps is acceptable. Modified: head/lib/libc/gen/utime.3 head/lib/libc/sys/utimes.2 Modified: head/lib/libc/gen/utime.3 ============================================================================== --- head/lib/libc/gen/utime.3 Thu Jun 9 22:01:05 2016 (r301767) +++ head/lib/libc/gen/utime.3 Thu Jun 9 22:14:58 2016 (r301768) @@ -28,7 +28,7 @@ .\" @(#)utime.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd June 9, 2016 .Dt UTIME 3 .Os .Sh NAME @@ -43,7 +43,8 @@ .Sh DESCRIPTION .Bf -symbolic This interface is obsoleted by -.Xr utimes 2 . +.Xr utimensat 2 +because it is not accurate to fractions of a second. .Ef .Pp The @@ -79,6 +80,7 @@ for any of the errors specified for the .Xr utimes 2 . .Sh SEE ALSO .Xr stat 2 , +.Xr utimensat 2 , .Xr utimes 2 .Sh STANDARDS The Modified: head/lib/libc/sys/utimes.2 ============================================================================== --- head/lib/libc/sys/utimes.2 Thu Jun 9 22:01:05 2016 (r301767) +++ head/lib/libc/sys/utimes.2 Thu Jun 9 22:14:58 2016 (r301768) @@ -30,7 +30,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 3, 2014 +.Dd June 9, 2016 .Dt UTIMES 2 .Os .Sh NAME @@ -52,6 +52,14 @@ .Ft int .Fn futimesat "int fd" "const char *path" "const struct timeval times[2]" .Sh DESCRIPTION +.Bf -symbolic +These interfaces are obsoleted by +.Xr futimens 2 +and +.Xr utimensat 2 +because they are not accurate to nanoseconds. +.Ef +.Pp The access and modification times of the file named by .Fa path or referenced by @@ -223,6 +231,7 @@ nor a file descriptor associated with a .Sh SEE ALSO .Xr chflags 2 , .Xr stat 2 , +.Xr utimensat 2 , .Xr utime 3 .Sh STANDARDS The @@ -231,7 +240,11 @@ function is expected to conform to .St -xpg4.2 . The .Fn futimesat -system call follows The Open Group Extended API Set 2 specification. +system call follows The Open Group Extended API Set 2 specification +but was replaced by +.Fn utimensat +in +.St -p1003.1-2008 . .Sh HISTORY The .Fn utimes _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"