Page MenuHomeFreeBSD

sys/_types.h: avoid use of __has_feature()
AcceptedPublic

Authored by brooks on Mon, Dec 1, 10:59 AM.
Tags
None
Referenced Files
F140628674: D54009.id168103.diff
Fri, Dec 26, 3:46 AM
Unknown Object (File)
Mon, Dec 22, 10:19 PM
Unknown Object (File)
Fri, Dec 19, 11:48 PM
Unknown Object (File)
Thu, Dec 18, 1:38 PM
Unknown Object (File)
Mon, Dec 15, 6:25 PM
Unknown Object (File)
Sun, Dec 14, 10:42 PM
Unknown Object (File)
Wed, Dec 10, 11:23 AM
Unknown Object (File)
Sat, Dec 6, 5:48 PM
Subscribers

Details

Reviewers
kib
des
imp
emaste
Group Reviewers
cheri
Summary

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.

This reverts commit 029a09f18032353a9ae874590b879322efc6e53a
This reverts commit 19728f31ae421f40e2b0b0c775f4eedd7f927be0

Effort: CHERI upstreaming
Fixes: 85ab981a8e4e ("sys/_types.h: define fallback __(u)intcap_t")
Sponsored by: Innovate UK

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 69274
Build 66157: arc lint + arc unit

Event Timeline

sys/sys/_types.h
164

The most optimal gate would probably be !defined(__INTCAP_TYPE__) since it's a fundamental type provided by the compiler, but we seem to have forgotten to define that macro. I've filed a bug report on that lack https://github.com/CTSRD-CHERI/llvm-project/issues/796

This revision is now accepted and ready to land.Mon, Dec 1, 7:07 PM

Switch to checking for SIZEOF_INTCAP. The compiler will define it
if it implements __intcap_t.

This revision now requires review to proceed.Mon, Dec 15, 5:19 PM
This revision is now accepted and ready to land.Tue, Dec 16, 6:46 AM