mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
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:
parent
7d889b99c1
commit
a194871b13
3 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ enum
|
||||||
x86_feature_1_shstk = 1U << 1
|
x86_feature_1_shstk = 1U << 1
|
||||||
};
|
};
|
||||||
|
|
||||||
static __inline__ _Bool
|
static __inline__ bool
|
||||||
x86_cpu_cet_active (unsigned int __index)
|
x86_cpu_cet_active (unsigned int __index)
|
||||||
{
|
{
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# error "Never include <bits/platform/features.h> directly; use <sys/platform/x86.h> instead."
|
# error "Never include <bits/platform/features.h> directly; use <sys/platform/x86.h> instead."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static __inline__ _Bool
|
static __inline__ bool
|
||||||
x86_cpu_cet_active (unsigned int __index)
|
x86_cpu_cet_active (unsigned int __index)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -30,7 +30,7 @@ __BEGIN_DECLS
|
||||||
extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)
|
extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)
|
||||||
__attribute__ ((pure));
|
__attribute__ ((pure));
|
||||||
|
|
||||||
static __inline__ _Bool
|
static __inline__ bool
|
||||||
x86_cpu_present (unsigned int __index)
|
x86_cpu_present (unsigned int __index)
|
||||||
{
|
{
|
||||||
const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
|
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);
|
return __ptr->cpuid_array[__reg] & (1 << __bit);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ _Bool
|
static __inline__ bool
|
||||||
x86_cpu_active (unsigned int __index)
|
x86_cpu_active (unsigned int __index)
|
||||||
{
|
{
|
||||||
if (__index == x86_cpu_IBT || __index == x86_cpu_SHSTK)
|
if (__index == x86_cpu_IBT || __index == x86_cpu_SHSTK)
|
||||||
|
|
Loading…
Add table
Reference in a new issue