aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-18 02:25:03 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-18 02:32:27 +0800
commita194871b13d6691d6ede3f62165eaf91064fcfe9 (patch)
treecc34873186258ac92f7437222f28d93c34ed402d
parent7d889b99c1ec62252d2cb3d89ba2956a2d567928 (diff)
downloadglibc-a194871b13d6691d6ede3f62165eaf91064fcfe9.zip
glibc-a194871b13d6691d6ede3f62165eaf91064fcfe9.tar.gz
glibc-a194871b13d6691d6ede3f62165eaf91064fcfe9.tar.bz2
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>
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/platform/features.h2
-rw-r--r--sysdeps/x86/bits/platform/features.h2
-rw-r--r--sysdeps/x86/sys/platform/x86.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/bits/platform/features.h b/sysdeps/unix/sysv/linux/x86/bits/platform/features.h
index 7704feb..1e63743 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/platform/features.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/platform/features.h
@@ -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__
diff --git a/sysdeps/x86/bits/platform/features.h b/sysdeps/x86/bits/platform/features.h
index f024892..676ad00 100644
--- a/sysdeps/x86/bits/platform/features.h
+++ b/sysdeps/x86/bits/platform/features.h
@@ -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;
diff --git a/sysdeps/x86/sys/platform/x86.h b/sysdeps/x86/sys/platform/x86.h
index b8066cc..1f53780 100644
--- a/sysdeps/x86/sys/platform/x86.h
+++ b/sysdeps/x86/sys/platform/x86.h
@@ -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)