From nobody Fri Dec 06 22:29:19 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 4Y4mC34yTDz5g1Br; Fri, 06 Dec 2024 22:29:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y4mC32sccz483n; Fri, 6 Dec 2024 22:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733524159; 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=eBCCcnZgNw3931MOhgdTJMBrzKE6yP2KMgwQPzhdUF0=; b=YyWmcybSBmP67jW7BlwgJXyOkncVhnrE5TjaT+IT6sWlQN1oNlllsETGNSimGD3QJ3A/JA Jd3/dczyvxdCE8NA5i3bRji55UR5aS1+lRXzzC2C+K4+Od+YIJgWzIsQk1uh0i3dL5B2J0 FcDvE8O1YtG5YlYrSgfUShO6gzSm+OULm4+oP2zkqS7cyGxjVSLxztBqh46Wc6T4N4bKQR JppTH7By+8dS6o5NkStaEZUc6DWo+CYp2dkQvi8agyYaSbaEYOTuOtEhvfdVEFq3cqksov E24BQwXktXlpWgEip7L3OM52Ik0OE6Jmm9GDziROj+VoInTeCSsEczuGG6Vu0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733524159; 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=eBCCcnZgNw3931MOhgdTJMBrzKE6yP2KMgwQPzhdUF0=; b=R5i7182Vq3HuHGWiGJt0DgBB6dNs0Hjt/tin9EtZr65UzuoB+/ti+nDLPqPkpm2Pb3k11S laGFbCC9byr7axWMWzVHPr5J2dhWH4S5+5QGaXttWTFIebfdiE8K22bzTRQ7JRBF7akh1e Dp3HIa1oCwds8N4qajdwMShiEWFRug6GUi7pcfFblhuNl/Ke+ohM6/ImBSUrVRmG+vraNZ W4wtj23mYd9mElTOE+AbjTlkKf631jYM5dvKSxjUsYbn3ZpKCaUlOLZcsqU5lS3SRqMbCv QsZ6KcRiDnaYut6kEB/C/blvTo4GnJHZ4PPJcfI9+mH3tAcYomBy5hWM8Anpag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733524159; a=rsa-sha256; cv=none; b=GoKRVyG40lMVOFXS9F/NBBD/ENTt43/doJINCjhjxB00VLXrdoW2/rdWrXpEK/MWHjevzH Z6VyQ8KGDKPc535TlHTqKtpMNupAyy9YR9DZ4/Zn6J8IQm9P+h3bxUaTtdijuBLTd4WuzZ 7+qvH+3Wn1L5jXQ2MgXxSqbgGmubEGsvKUp60TQcvlvTU5YaMqHLY1aiHp7mbcmHaveOvQ 86Y8uBJMpiwHBJ7R8VnnpwBA7+3fFootwxIXcQxXz5av8HzeYckLwgTEnSj7VUJdkfxTKo r7UBZmB2KUlSrdMW/1xg22Lq2u61TX3sbHLcY2JYrgDsnZixuWHDSFl8PBvmGA== 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 4Y4mC32RCqzwqV; Fri, 6 Dec 2024 22:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B6MTJtI072315; Fri, 6 Dec 2024 22:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B6MTJ0d072312; Fri, 6 Dec 2024 22:29:19 GMT (envelope-from git) Date: Fri, 6 Dec 2024 22:29:19 GMT Message-Id: <202412062229.4B6MTJ0d072312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6da04bcff9ef - main - cdefs: Add __deprecated1 which accepts a message as an argument 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6da04bcff9efedeae7d4046553002b9e3b2bc24f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6da04bcff9efedeae7d4046553002b9e3b2bc24f commit 6da04bcff9efedeae7d4046553002b9e3b2bc24f Author: John Baldwin AuthorDate: 2024-12-06 22:26:27 +0000 Commit: John Baldwin CommitDate: 2024-12-06 22:26:46 +0000 cdefs: Add __deprecated1 which accepts a message as an argument This message will be included in any warning issued by the compiler for use of the deprecated function. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47701 --- share/man/man9/cdefs.9 | 7 ++++++- sys/sys/cdefs.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 0edd6e8392ca..b9821c70f2a1 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd November 20, 2024 +.Dd December 6, 2024 .Dt CDEFS 9 .Os .Sh NAME @@ -91,6 +91,11 @@ warn about it .It Sy __deprecated Ta Function interface has been deprecated, and clients should migrate to a new interface. A warning will be issued for clients of this interface. +.It Sy __deprecated1(msg) Ta Function interface has been deprecated, and clients +should migrate to a new interface. +The string +.Fa msg +will be included in a warning issued for clients of this interface. .It Sy __packed Ta \&Do not have space between structure elements for natural alignment. Used when communicating with external protocols. .It Sy __aligned(x) Ta Specify in bytes the minimum alignment for the specified field, structure or variable diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 4f4f09a3d763..c46be9f35842 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -155,6 +155,7 @@ #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) #define __deprecated __attribute__((__deprecated__)) +#define __deprecated1(msg) __attribute__((__deprecated__(msg))) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x)))