set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")
-if(BUILD_TESTING AND (NOT WIN32))
+if(BUILD_TESTING AND ((NOT WIN32) AND (NOT APPLE)))
add_subdirectory(test)
endif()
#endif
/* If GCC */
-# ifdef __GNUC__
+#ifdef __GNUC__
-# define xgetbv(_func_, _lo_, _hi_) \
+#ifdef __AVX__
+#define xgetbv(_func_, _lo_, _hi_) \
__asm__ __volatile__ ("xgetbv" : "=a" (_lo_), "=d" (_hi_) : "c" (_func_))
+#endif
static void cpuid(
unsigned info,
if (c & C_BIT_SSE42)
hints->x86_flags |= PRIM_X86_SSE42_AVAILABLE;
+#ifdef __AVX__
if ((c & C_BITS_AVX) == C_BITS_AVX)
{
int e, f;
}
}
/* TODO: AVX2: set eax=7, ecx=0, cpuid, check ebx-bit5 */
+#endif
}
-# else
+
+#else
+
static void set_hints(primitives_hints_t* hints)
{
/* x86 non-GCC: TODO */
}
-# endif /* __GNUC__ */
+
+#endif /* __GNUC__ */
+
/* ------------------------------------------------------------------------- */
+
#elif defined(__arm__) || defined(__ARM_ARCH_7A__) \
|| defined(__ARM_EABI__) || defined(__ARMEL__) || defined(ANDROID)
#ifndef __arm__
WINPR_API VOID ExitProcess(UINT uExitCode);
-WINPR_API HANDLE GetCurrentProcess(VOID);
+WINPR_API HANDLE _GetCurrentProcess(VOID);
WINPR_API DWORD GetCurrentProcessId(VOID);
WINPR_API BOOL TerminateProcess(HANDLE hProcess, UINT uExitCode);
WINPR_API VOID ExitThread(DWORD dwExitCode);
-WINPR_API HANDLE GetCurrentThread(VOID);
+WINPR_API HANDLE _GetCurrentThread(VOID);
WINPR_API DWORD GetCurrentThreadId(VOID);
WINPR_API DWORD ResumeThread(HANDLE hThread);
WINPR_API BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
WINPR_API BOOL TlsFree(DWORD dwTlsIndex);
+#else
+
+/*
+ * GetCurrentProcess / GetCurrentThread cause a conflict on Mac OS X
+ */
+#define _GetCurrentProcess GetCurrentProcess
+#define _GetCurrentThread GetCurrentThread
+
#endif
#endif /* WINPR_THREAD_H */
}
-HANDLE GetCurrentProcess(VOID)
+HANDLE _GetCurrentProcess(VOID)
{
return NULL;
}
pthread_exit((void*) dwExitCode);
}
-HANDLE GetCurrentThread(VOID)
+HANDLE _GetCurrentThread(VOID)
{
return NULL;
}