Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2020-05-01 20:20:43 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-05-27 22:05:52 +0300
commitfda1c74539d7b0680f34ca765c2c0055d8f2bb3e (patch)
treec51f11b609be7b4bc60381d763e5cca7a8bb3ea6 /libavutil/attributes.h
parent61c1df73d661d043364b1c3112c39ea343c577cb (diff)
Use gcc/clang builtins for av_sat_(add|sub)_64_c if available.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/attributes.h')
-rw-r--r--libavutil/attributes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index ced108aa2c..ab2a1fdd0e 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -34,6 +34,12 @@
# define AV_GCC_VERSION_AT_MOST(x,y) 0
#endif
+#ifdef __has_builtin
+# define AV_HAS_BUILTIN(x) __has_builtin(x)
+#else
+# define AV_HAS_BUILTIN(x) false
+#endif
+
#ifndef av_always_inline
#if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_always_inline __attribute__((always_inline)) inline