Date: Mon, 29 Dec 2025 23:48:58 +0000 From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Warner Losh <imp@FreeBSD.org> Subject: git: 9622eff37fbd - stable/13 - cdefs: Add __deprecated Message-ID: <6953136a.265ae.57da709a@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9622eff37fbd62b2c5227c959973c565dbf774e6 commit 9622eff37fbd62b2c5227c959973c565dbf774e6 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-10-15 19:49:53 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2025-12-29 23:46:49 +0000 cdefs: Add __deprecated Add __deprecated decorator. This is for a deprecated interface. copystr is tagged with this today in copy(9), but don't actually provide it or use it. copystr is a #define so adding it will have to wait. LinuxKPI was defining this away completely in compiler.h. Since this is shared between Linux KPI consumers and OpenZFS, if it's already defined, use the FreeBSD sys/cdefs.h version, otherwise define it away. For OpenZFS this will retain it, while for Linux KPI it will tend to drop it (I think always, but I didn't look at everything). Sponsored by: Netflix Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D46137 (cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 2 ++ sys/sys/cdefs.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 94595b2e8c50..c5a88dc2efa4 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -48,7 +48,9 @@ #define __cond_lock(x,c) (c) #define __bitwise #define __devinitdata +#ifndef __deprecated #define __deprecated +#endif #define __init #define __initconst #define __devinit diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 96a3742c4a1d..9ba91054e923 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -215,6 +215,7 @@ #define __pure2 __attribute__((__const__)) #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) +#define __deprecated __attribute__((__deprecated__)) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x)))home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6953136a.265ae.57da709a>
