From nobody Thu Apr 25 09:44:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VQ9sr6CD6z5HD73; Thu, 25 Apr 2024 09:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQ9sr5kN7z4sm9; Thu, 25 Apr 2024 09:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714038240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZHD3lz4sU0zDxv49UbuaD7f5ozIm1gVnf4ALUzLsSTw=; b=YOsiUPzKjnql0bF/GolB/EoQHz75lzkb2RUJBRZnc1sbffSzYJ7MsW46F34gE04Uu2kq2+ 9U9uW9qM+DuzobL2xFdD/C0mIebvKKivsli8gVFOn0dsJsXKtSHHkqh+j799N5bgtcI7yx TaE0OVZwVEssNQ9V7ak/3iujRnUUE7i0tGSWusMrme51B5qaRLF6tO8tiSo2IHJITBv4b3 iYHclZtw9nxyat69hmzVL+3lhrFHeE1jty7V0vc19VF3NIANC3eBflgssduG+SNKAvHL98 02PYmA4HARkJLyIkCyGD0gntnlVv4YJotK6kPFxJNnaQeNaxhLKtaO6g72cHBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714038240; a=rsa-sha256; cv=none; b=fihUb749wipIbn7xlb/3wOZXziKpitYrIwO7xxQw8qCUmEuyNDjdlaFuvmqgYocYGkZbZL bUjInSX4I09ZhHuHa+AsHvScEyc5+shGe4NIphhFrbjTbllE0T52VILGqwp+E++TrPid1r RbIQEGC5BQ8aanD7pZ3ZDaheiUgIY4I6OmrZW+EMz0QL6Hcv4rfbdNNjfh28fFXEyxK77V nH17eGOAxKezMKQQ+GPLINfLTqfOSYGQSSL65x2T0e3qrZeL2yJd8bgtyPMpBc2d2I9OtG dwpateayOldPaT9gzEpjkqH4rjnLSB6PFoLuuNvIt3Ua41dYMDVCRUCmdZhmRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714038240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZHD3lz4sU0zDxv49UbuaD7f5ozIm1gVnf4ALUzLsSTw=; b=jhnptTQWkAvYVOCV3UeR7PSQTyd9PxH6t7orYMtYCBPOvqj3cpRWsUoIZ9q+glhTDhSWle WzgYkQlT7M1vxJNvFy0eewUB9wK065tZLYJXd0wVM4BKGP2os11doASUkmVVieik230YG0 gDwsCXOYhM0rfNgfYe0g7oJCUCRZz/bqw2xNrYFUN3kTtq+YO+BSw+WTv5nSPjohryDde+ Q1JM49/LMufqlZwGvUxp6EKyy1BVGhgBJn3HGpk+pkiTbCLvWClzTlbBPvqpRd77Z3nf6P 53nIJ+yDF61mEcPMIFzYVssyZX31DRFhudmm6TMnGwVunBRT2warU7xEQ7pPcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VQ9sr5L46zvHH; Thu, 25 Apr 2024 09:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P9i0nM037392; Thu, 25 Apr 2024 09:44:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P9i0I5037389; Thu, 25 Apr 2024 09:44:00 GMT (envelope-from git) Date: Thu, 25 Apr 2024 09:44:00 GMT Message-Id: <202404250944.43P9i0I5037389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 4395d3ced5cf - main - Document that gettimeofday() is obsolescent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4395d3ced5cfa46df400b5bb9996f9d74476997e Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4395d3ced5cfa46df400b5bb9996f9d74476997e commit 4395d3ced5cfa46df400b5bb9996f9d74476997e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-24 11:31:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-25 09:42:59 +0000 Document that gettimeofday() is obsolescent Reported by: kaktus Reviewed by: kaktus, pstef MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23942 --- lib/libsys/gettimeofday.2 | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2 index 5b867aaad33c..cfba97149199 100644 --- a/lib/libsys/gettimeofday.2 +++ b/lib/libsys/gettimeofday.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 13, 2021 +.Dd April 24, 2024 .Dt GETTIMEOFDAY 2 .Os .Sh NAME @@ -41,6 +41,17 @@ .Ft int .Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp" .Sh DESCRIPTION +.Em Note : +The +.Nm gettimeofday +function +.Po but not +.Nm settimeofday Pc +is obsolescent. +See the +.Sx STANDARDS +section for more details. +.Pp The system's notion of the current Greenwich time and the current time zone is obtained with the .Fn gettimeofday @@ -121,6 +132,18 @@ A user other than the super-user attempted to set the time. .Xr ctime 3 , .Xr timeradd 3 , .Xr clocks 7 +.Sh STANDARDS +The +.Nm gettimeofday +function is considered obsolescent and its usage discouraged by +.\" XXX: This should be replaced in the future when an appropriate argument to +.\" the St macro is available: -p1003.1-2017 +.No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) . +Application should use the +.Xr clock_gettime 2 +function instead as +.Nm gettimeofday +might be removed in the future. .Sh HISTORY The .Fn gettimeofday