ref: e12b9428cfd96668aaa30cc35023b7cae17c95a4
parent: ce29e1004fd388c2504485145aea87dc8a8eb64e
author: Jörn Heusipp <[email protected]>
date: Fri Jan 12 07:19:53 EST 2018
Rename __cpuid to minimp3_cpuid because double underscore names are reserved in C.
--- a/minimp3.h
+++ b/minimp3.h
@@ -97,8 +97,10 @@
# define VMUL_S(x, s) _mm_mul_ps(x, _mm_set1_ps(s))
# define VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3))
typedef __m128 f4;
-#ifndef _MSC_VER
-static __inline__ __attribute__((always_inline)) void __cpuid(int CPUInfo[], const int InfoType)
+#ifdef _MSC_VER
+#define minimp3_cpuid __cpuid
+#else
+static __inline__ __attribute__((always_inline)) void minimp3_cpuid(int CPUInfo[], const int InfoType)
{
#if defined(__PIC__)
__asm__ __volatile__(
@@ -125,10 +127,10 @@
static int have_simd()
{
int CPUInfo[4];
- __cpuid(CPUInfo, 0);
+ minimp3_cpuid(CPUInfo, 0);
if (CPUInfo[0] > 0)
{
- __cpuid(CPUInfo, 1);
+ minimp3_cpuid(CPUInfo, 1);
return (CPUInfo[3] & (1 << 26)); // SSE2
}
return 0;