From owner-svn-src-head@freebsd.org Thu Jun 9 22:15:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FAD6B70F1A; Thu, 9 Jun 2016 22:15:00 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 043EA1767; Thu, 9 Jun 2016 22:14:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u59MExi5076716; Thu, 9 Jun 2016 22:14:59 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u59MExl7076714; Thu, 9 Jun 2016 22:14:59 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201606092214.u59MExl7076714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 9 Jun 2016 22:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301768 - in head/lib/libc: gen sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 22:15:00 -0000 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