From nobody Thu Apr 25 10:17:58 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 4VQBd94Tp5z5HHrh; Thu, 25 Apr 2024 10:18:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4VQBd90d6yz4xV1; Thu, 25 Apr 2024 10:18:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 43PAHwLE076575; Thu, 25 Apr 2024 13:18:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 43PAHwLE076575 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 43PAHwGB076574; Thu, 25 Apr 2024 13:17:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Apr 2024 13:17:58 +0300 From: Konstantin Belousov To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4395d3ced5cf - main - Document that gettimeofday() is obsolescent Message-ID: References: <202404250944.43P9i0I5037389@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202404250944.43P9i0I5037389@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4VQBd90d6yz4xV1 On Thu, Apr 25, 2024 at 09:44:00AM +0000, Mateusz Piotrowski wrote: > 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. Obviously gettimeofday(2) is not going to be removed even in the far future. > .Sh HISTORY > The > .Fn gettimeofday