summaryrefslogtreecommitdiff
path: root/ffmpeg/darwin-aarch64/include/libavutil/attributes.h
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/darwin-aarch64/include/libavutil/attributes.h')
-rw-r--r--ffmpeg/darwin-aarch64/include/libavutil/attributes.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/ffmpeg/darwin-aarch64/include/libavutil/attributes.h b/ffmpeg/darwin-aarch64/include/libavutil/attributes.h
index 54d1901..5cb9fe3 100644
--- a/ffmpeg/darwin-aarch64/include/libavutil/attributes.h
+++ b/ffmpeg/darwin-aarch64/include/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) 0
+#endif
+
#ifndef av_always_inline
#if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_always_inline __attribute__((always_inline)) inline
@@ -66,19 +72,19 @@
# define av_noinline
#endif
-#if AV_GCC_VERSION_AT_LEAST(3,1)
+#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
# define av_pure __attribute__((pure))
#else
# define av_pure
#endif
-#if AV_GCC_VERSION_AT_LEAST(2,6)
+#if AV_GCC_VERSION_AT_LEAST(2,6) || defined(__clang__)
# define av_const __attribute__((const))
#else
# define av_const
#endif
-#if AV_GCC_VERSION_AT_LEAST(4,3)
+#if AV_GCC_VERSION_AT_LEAST(4,3) || defined(__clang__)
# define av_cold __attribute__((cold))
#else
# define av_cold
@@ -138,19 +144,19 @@
# define av_used
#endif
-#if AV_GCC_VERSION_AT_LEAST(3,3)
+#if AV_GCC_VERSION_AT_LEAST(3,3) || defined(__clang__)
# define av_alias __attribute__((may_alias))
#else
# define av_alias
#endif
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
# define av_uninit(x) x=x
#else
# define av_uninit(x) x
#endif
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__clang__)
# define av_builtin_constant_p __builtin_constant_p
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
#else
@@ -158,7 +164,7 @@
# define av_printf_format(fmtpos, attrpos)
#endif
-#if AV_GCC_VERSION_AT_LEAST(2,5)
+#if AV_GCC_VERSION_AT_LEAST(2,5) || defined(__clang__)
# define av_noreturn __attribute__((noreturn))
#else
# define av_noreturn