From efe564e3b359a6045826beafaab106dbf738299c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Lemaignan?= Date: Tue, 26 Nov 2013 05:53:44 +0100 Subject: [PATCH] Ensure compilation to Javascript with Emscripten --- modules/core/include/opencv2/core/cvdef.h | 2 +- modules/core/src/system.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index c831e8091b..1942793edb 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -444,7 +444,7 @@ CV_INLINE int cvIsInf( double value ) // atomic increment on the linux version of the Intel(tm) compiler # define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast(reinterpret_cast(addr)), delta) #elif defined __GNUC__ -# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ +# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ # ifdef __ATOMIC_ACQ_REL # define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL) # else diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 252f277d1e..eee06e2905 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -157,7 +157,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix) #include -#if defined __linux__ || defined __APPLE__ +#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ #include #include #include