Re: svn commit: r319663 - head/lib/libc/sys

From: Sergey Kandaurov <pluknet_at_gmail.com>
Date: Thu, 09 Jun 2022 21:02:01 UTC
On Thu, 8 Jun 2017 at 01:21, Jilles Tjoelker <jilles@freebsd.org> wrote:

> Author: jilles
> Date: Wed Jun  7 21:21:14 2017
> New Revision: 319663
> URL: https://svnweb.freebsd.org/changeset/base/319663
>
> Log:
>   libc: Remove futimens() and utimensat() compat stubs.
>
>   The futimens() and utimensat() compat stubs allowed using these
> functions on
>   kernels that did not have the system calls yet (10.2, old 11-current).
>
>   Also remove the documentation of the [ENOTSUP] error that could occur
> with
>   an old kernel.
>
>   A -DNO_CLEAN build may fail because the depend files refer to the deleted
>   files.
>
> Deleted:
>   head/lib/libc/sys/futimens.c
>   head/lib/libc/sys/utimensat.c
> Modified:
>   head/lib/libc/sys/Makefile.inc
>   head/lib/libc/sys/utimensat.2
>
> Modified: head/lib/libc/sys/Makefile.inc
>
> ==============================================================================
> --- head/lib/libc/sys/Makefile.inc      Wed Jun  7 21:18:28 2017
> (r319662)
> +++ head/lib/libc/sys/Makefile.inc      Wed Jun  7 21:21:14 2017
> (r319663)
> @@ -37,10 +37,6 @@ SRCS+=       \
>
>  SRCS+= getdents.c lstat.c mknod.c stat.c
>
> -SRCS+= futimens.c utimensat.c
> -NOASM+= futimens.o utimensat.o
> -PSEUDO+= _futimens.o _utimensat.o
> -
>  SRCS+= pipe.c
>
>  INTERPOSED = \
>
> Modified: head/lib/libc/sys/utimensat.2
>
> ==============================================================================
> --- head/lib/libc/sys/utimensat.2       Wed Jun  7 21:18:28 2017
> (r319662)
> +++ head/lib/libc/sys/utimensat.2       Wed Jun  7 21:21:14 2017
> (r319663)
> @@ -31,7 +31,7 @@
>  .\"     @(#)utimes.2   8.1 (Berkeley) 6/4/93
>  .\" $FreeBSD$
>  .\"
> -.Dd January 17, 2016
> +.Dd June 7, 2017
>  .Dt UTIMENSAT 2
>  .Os
>  .Sh NAME
> @@ -267,10 +267,6 @@ argument is not an absolute path and
>  is neither
>  .Dv AT_FDCWD
>  nor a file descriptor associated with a directory.
> -.It Bq Er ENOTSUP
> -The running kernel does not support this system call and
> -.Dv AT_SYMLINK_NOFOLLOW
> -is used with a path relative to a file descriptor.
>  .El
>  .Sh SEE ALSO
>  .Xr chflags 2 ,
>

I believe the compatibility part can be removed too:

diff --git a/lib/libc/sys/utimensat.2 b/lib/libc/sys/utimensat.2
index 2af452898c9..53602d68ba8 100644
--- a/lib/libc/sys/utimensat.2
+++ b/lib/libc/sys/utimensat.2
@@ -169,18 +169,6 @@ operate on the current working directory.
 .El
 .Sh RETURN VALUES
 .Rv -std
-.Sh COMPATIBILITY
-If the running kernel does not support this system call,
-a wrapper emulates it using
-.Xr fstatat 2 ,
-.Xr futimesat 2
-and
-.Xr lutimes 2 .
-As a result, timestamps will be rounded down to the nearest microsecond,
-.Dv UTIME_OMIT
-is not atomic and
-.Dv AT_SYMLINK_NOFOLLOW
-is not available with a path relative to a file descriptor.
 .Sh ERRORS
 These system calls will fail if:
 .Bl -tag -width Er