mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
sys/_types.h: avoid use of __has_feature()
Only fairly recent GCC versions support and sys/_types.h must work with quite old compilers and without sys/cdef.h being included. The prior workaround works fine, but we can have the same effect with compiler macro definitions. In this specific case, compilers that define the __intcap_t builtin type will define __SIZEOF_INTCAP__. This reverts commit029a09f180This reverts commit19728f31aeReviewed by: imp, des, kib, emaste Effort: CHERI upstreaming Fixes:85ab981a8e("sys/_types.h: define fallback __(u)intcap_t") Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D54009
This commit is contained in:
parent
31e7dc6b9a
commit
0a64d16cef
1 changed files with 1 additions and 4 deletions
|
|
@ -161,10 +161,7 @@ typedef int __cpulevel_t; /* level parameter for cpuset. */
|
|||
typedef int __cpusetid_t; /* cpuset identifier. */
|
||||
typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */
|
||||
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
#if !__has_feature(capabilities)
|
||||
#ifndef __SIZEOF_INTCAP__
|
||||
/*
|
||||
* On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that
|
||||
* hybrid-C code which needs to be explicitly aware of capabilities can
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue