From nobody Sat May 4 13:07:05 2024 X-Original-To: dev-commits-src-all@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 4VWny21kN1z5KXKV; Sat, 4 May 2024 13:07:06 +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 4VWny20s7Kz4Cvs; Sat, 4 May 2024 13:07:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714828026; 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=AyXc3HDaPUHEJMWU0xy5JNDKBXJnsxym9c1jC9RkHDI=; b=JdNsx+uppOuGTCD2fUQuIiIQTvtpbcgiqJIzQ1N+uPtcaso91hGneeHXKndR3xkR2hManU APKaDnymI3+bDrnqSJpaido+WaiLP79eXf7vePVuJGIBUwcZok3O4+NGzLbPEK89Ud3Q8x mLXrLhaeP9Ff6FMyv615+Poc8yLjpNWI2O3XFFIg6ayz/fz9mV1ffMJRxpl6AeoL7DXBKR pmqG/gDy7fxoLmaeJ4yUB4KlejVuTtkgP+v3s2zDKy1MxnLsMdFnaJVAnMthrMijzZTqkI 7b6DDyTZ7PAEh9v2JWgOrZOXRGJgAhXNjG5EElHnV7cob4RYUjVZV/Rwjn9DJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714828026; a=rsa-sha256; cv=none; b=Q2/IfKLn/l4av9ZEOrpEzUHSwRLhsg07kWvD+yUEBj2RQUsUChYS7pNICIFMk2U+0orPjl hx6E/kEILEag/Hk+0mur83Lb3fqlVtpeuJ3YE8aYIISOjNJixsMZAqJCIEetCOzDYlsacZ KncKdpkjGIi+Xef/FDpGJO4oLmw4IP0rECqq1qfQZIG/uwdxvG6Cp1Jqf4csJXLAojypIU pbWKNrNSaL+cy1rHQZ0jwSfDUCY2xK/ES7ZMnjb8aAUdYF4tRRTs77S+69xKEGLUt0jE2p jh2WEM2iCIwkhnFeh/3k7bw6zHIZP83naPmcjaYBG1fHfVZuy5hxeQvBY0Oumw== 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=1714828026; 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=AyXc3HDaPUHEJMWU0xy5JNDKBXJnsxym9c1jC9RkHDI=; b=NyJydc19kbHh2aprWoWlpJj+TBkBRRAbzW7M2E7sfGAwQ3VPk489K4hh1xe3foKsq+TpbR 9H8rvwf4JWVbEoMolleP1DaCOTkSu7aPkzM+u2zUT+kQTglS0dBTsJqlJoUXxe1m/J6OpH lYPqGa9okJG4fTRVTfHAJH/Cq4QK/sKgDyDum/JpgHzDW0ik37a+qksN78+neQFKqqkrrw QQIdUVq+dY+QMYCOKzNcxpSexZYV8PRfa7ks4c8Z4ivavpkJh1UrRyjF81bgWNpFh8fNIG WVmBzWD6V6fC+E1TywkT3dhpn0gnUfNc0asgwwPkTlYeVMGETjx/7iBJZlMTCQ== 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 4VWny20P3TzWNc; Sat, 4 May 2024 13:07:06 +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 444D75q8024673; Sat, 4 May 2024 13:07:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 444D75kA024670; Sat, 4 May 2024 13:07:05 GMT (envelope-from git) Date: Sat, 4 May 2024 13:07:05 GMT Message-Id: <202405041307.444D75kA024670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f7659ab23590 - stable/13 - Document that gettimeofday() is obsolescent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: f7659ab23590a46d148bf47db9eb4719f3c0aeed Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f7659ab23590a46d148bf47db9eb4719f3c0aeed commit f7659ab23590a46d148bf47db9eb4719f3c0aeed Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-24 11:31:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-05-04 13:06:40 +0000 Document that gettimeofday() is obsolescent Reported by: kaktus Reviewed by: kaktus, pstef MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23942 (cherry picked from commit 4395d3ced5cfa46df400b5bb9996f9d74476997e) --- lib/libc/sys/gettimeofday.2 | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2 index a27aecba3fc7..27149dcbeb1d 100644 --- a/lib/libc/sys/gettimeofday.2 +++ b/lib/libc/sys/gettimeofday.2 @@ -27,7 +27,7 @@ .\" .\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95 .\" -.Dd May 13, 2021 +.Dd April 24, 2024 .Dt GETTIMEOFDAY 2 .Os .Sh NAME @@ -43,6 +43,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 @@ -123,6 +134,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