git: c7826c81fe43 - stable/13 - cdefs: Add __deprecated1 which accepts a message as an argument
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Dec 2025 23:48:59 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=c7826c81fe43995910b58e01f948faaa41d82fa6
commit c7826c81fe43995910b58e01f948faaa41d82fa6
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-12-06 22:26:27 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2025-12-29 23:46:49 +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
(cherry picked from commit 6da04bcff9efedeae7d4046553002b9e3b2bc24f)
---
sys/sys/cdefs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 9ba91054e923..d3b196869ed2 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -216,6 +216,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)))