1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-10-06 05:47:18 +02:00

avutil/attributes: add AV_HAS_STD_ATTRIBUTE

For testing language standard attributes, for both C++ and C.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow
2025-09-25 19:10:01 +02:00
committed by Niklas Haas
parent d6cb0d2c2b
commit a7f0377a3d

View File

@@ -40,6 +40,14 @@
# define AV_HAS_BUILTIN(x) 0 # define AV_HAS_BUILTIN(x) 0
#endif #endif
#if defined(__cplusplus) && defined(__has_cpp_attribute)
# define AV_HAS_STD_ATTRIBUTE(x) __has_cpp_attribute(x)
#elif !defined(__cplusplus) && defined(__has_c_attribute)
# define AV_HAS_STD_ATTRIBUTE(x) __has_c_attribute(x)
#else
# define AV_HAS_STD_ATTRIBUTE(x) 0
#endif
#ifndef av_always_inline #ifndef av_always_inline
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_always_inline __attribute__((always_inline)) inline # define av_always_inline __attribute__((always_inline)) inline