Fix x86 ClangCL and GCC/Clang -std=c## compiles

Fixes: libtom/libtomcrypt#767
This commit is contained in:
polymeric 2026-06-04 19:44:52 -04:00 committed by Steffen Jaeckel
parent a467ea586b
commit 8a29577eed
5 changed files with 5 additions and 5 deletions

View file

@ -15,7 +15,7 @@
#define LTC_S_X86_CPUID
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
{
#if defined _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__) // MSVC but not ClangCL
__cpuid(regs, leaf);
#else
int a, b, c, d;

View file

@ -33,7 +33,7 @@
#define LTC_S_X86_CPUID
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
{
#if defined _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__) // MSVC but not ClangCL
__cpuid(regs, leaf);
#else
int a, b, c, d;

View file

@ -28,7 +28,7 @@ const struct ltc_hash_descriptor sha1_desc =
#define LTC_S_X86_CPUID
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
{
#if defined _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__) // MSVC but not ClangCL
__cpuid(regs, leaf);
#else
int a, b, c, d;

View file

@ -33,7 +33,7 @@ const struct ltc_hash_descriptor sha224_desc =
#define LTC_S_X86_CPUID
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
{
#if defined _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__) // MSVC but not ClangCL
__cpuid(regs, leaf);
#else
int a, b, c, d;

View file

@ -8,7 +8,7 @@
#define LTC_S_X86_CPUID
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
{
#if defined _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__) // MSVC but not ClangCL
__cpuid(regs, leaf);
#else
int a, b, c, d;