[FFmpeg-cvslog] configure: make the C11 atomics check more robust

Michael Niedermayer git at videolan.org
Fri Apr 13 17:09:17 EEST 2018


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Apr 13 11:04:40 2018 -0300| [876f9ac9a682fc2a3b05d2fe35354d717ae39dc3] | committer: James Almer

configure: make the C11 atomics check more robust

C11 atomics allow direct access. This check should prevent the usage
of bogus stdatomic.h available on some systems.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=876f9ac9a682fc2a3b05d2fe35354d717ae39dc3
---

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index c935d87b81..73857f4511 100755
--- a/configure
+++ b/configure
@@ -5825,7 +5825,7 @@ check_header asm/types.h
 # it seems there are versions of clang in some distros that try to use the
 # gcc headers, which explodes for stdatomic
 # so we also check that atomics actually work here
-check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0)"
+check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar"
 
 check_lib advapi32 "windows.h"            RegCloseKey          -ladvapi32
 check_lib ole32    "windows.h"            CoTaskMemFree        -lole32



More information about the ffmpeg-cvslog mailing list