Commit efe564e3 authored by Séverin Lemaignan's avatar Séverin Lemaignan

Ensure compilation to Javascript with Emscripten

parent b27d7d2a
...@@ -444,7 +444,7 @@ CV_INLINE int cvIsInf( double value ) ...@@ -444,7 +444,7 @@ CV_INLINE int cvIsInf( double value )
// atomic increment on the linux version of the Intel(tm) compiler // atomic increment on the linux version of the Intel(tm) compiler
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta) # define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
#elif defined __GNUC__ #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 # ifdef __ATOMIC_ACQ_REL
# define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL) # define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)
# else # else
......
...@@ -157,7 +157,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix) ...@@ -157,7 +157,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
#include <stdarg.h> #include <stdarg.h>
#if defined __linux__ || defined __APPLE__ #if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment