From nobody Sat May 4 13:05:33 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 4VWnwF3sXyz5KXSL; Sat, 4 May 2024 13:05:33 +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 4VWnwF2qsvz4CbZ; Sat, 4 May 2024 13:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714827933; 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=rJJb1RK6iHgYG0Sx1fxF0gTuHww10AtFvGWWFFcdEhs=; b=yRewN3+fI9t/LngY7mA0JcrecYoiUIRlAVxZ/pkHGHeCgvpn3BdgSPfXH/jrzhgy8qke8a uikqfVAdx+ZJrQanbL4ylyJCpDSOwvmsqUoubYmB09O7p62UErTCAhc9r/OOop+p1LZZnx tCaXmmN9CadXElzNYohrS0aaXHPsb9Lci0Sa0IfavvLkGoRsaLXo6mv2Hb9N77gK8Vys+v NAIXm3Nkno+o9JpEgBbwDiLD8H4zO6QxoiykyuTTGfxpwl8NcRgw5MBREq3ydsqlwqhqSl xpuhl2KLlcFmiNdyGmuwDud7aUvAzInFeRL2ljkXvaJWdMjONY/tMzX9G1h36w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714827933; a=rsa-sha256; cv=none; b=mTNs1Gj4gtGqXkjBA8IYrtTiUlHEUqvXpSgdZ7kgwScDTLRL1EqvuaP6FR0NxQ035GNqoL 0FzXA/cqor5tx5rWGbuX4MMjdx3K+H9laTXh9QpXkP4OLSoIyuUkSD/tIxEgu+dNM350/G Dqi+cavCIlOODjrRBN9ZR1oebDJS/inqmc4Mh2AiTpMGcm1dg9c2c1U1Sco9mKV2Brdzat 4YWyG/eMBSIqV0d+l1gKAhxKZPUHmw3ntgGBb1nekxU0Ppx3RyNnHsn6QxbBzBlQZ4kuXt dQjvunR7dIHr/sCobuXr9HQOfMRTZSk3EHuXjAPYUdzFd6vg+lFQSL0+VzjXAQ== 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=1714827933; 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=rJJb1RK6iHgYG0Sx1fxF0gTuHww10AtFvGWWFFcdEhs=; b=OHwqPhcH5DtuFu04j4qwxA+8ciueYhXEnzXvGBnGNYexV2Bj0PvOHfe7+o0YoalFRyQ0ZY T1AbjoYlvj5vpjU35iPn4H1dwqklCAhudXx4fMj1y14nfygvJmzx2/hDnwZz4tjOZURznS S1zaBbiYSmIy+XQ4amk3pPCMkNM/MIrBxQ7pKeJLUvV4X8sViFWj0KdXDsMFFHdlP0vY6B FtRV68Lib2T5QTtQQC7RovTn6LZRGNxJ8m+UTLUQnhUG6pRGxJ90+k4Ut8pY+cYt7XG17S 3H/ni48z1aNsHUPYixgqDlQ5wbziDsFIsCuHCddD3hXjENOnDp71CMoPlvaAsA== 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 4VWnwF29QmzWNb; Sat, 4 May 2024 13:05:33 +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 444D5Xfu024284; Sat, 4 May 2024 13:05:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 444D5XF2024281; Sat, 4 May 2024 13:05:33 GMT (envelope-from git) Date: Sat, 4 May 2024 13:05:33 GMT Message-Id: <202405041305.444D5XF2024281@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: c32f8e613e57 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: c32f8e613e5795239359ca53f7a4dfe30ed1933a Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=c32f8e613e5795239359ca53f7a4dfe30ed1933a commit c32f8e613e5795239359ca53f7a4dfe30ed1933a 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:04:47 +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