sys/platform/x86.h: Do not depend on _Bool definition in C++ mode

Clang does not define _Bool for -std=c++98:

/usr/include/bits/platform/features.h:31:19: error: unknown type name '_Bool'
   31 | static __inline__ _Bool
      |                   ^

Change _Bool to bool to silence clang++ error.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
H.J. Lu 2024-12-18 02:25:03 +08:00
parent 7d889b99c1
commit a194871b13
3 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ enum
x86_feature_1_shstk = 1U << 1
};
static __inline__ _Bool
static __inline__ bool
x86_cpu_cet_active (unsigned int __index)
{
#ifdef __x86_64__

View File

@ -20,7 +20,7 @@
# error "Never include <bits/platform/features.h> directly; use <sys/platform/x86.h> instead."
#endif
static __inline__ _Bool
static __inline__ bool
x86_cpu_cet_active (unsigned int __index)
{
return false;

View File

@ -30,7 +30,7 @@ __BEGIN_DECLS
extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)
__attribute__ ((pure));
static __inline__ _Bool
static __inline__ bool
x86_cpu_present (unsigned int __index)
{
const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
@ -43,7 +43,7 @@ x86_cpu_present (unsigned int __index)
return __ptr->cpuid_array[__reg] & (1 << __bit);
}
static __inline__ _Bool
static __inline__ bool
x86_cpu_active (unsigned int __index)
{
if (__index == x86_cpu_IBT || __index == x86_cpu_SHSTK)