1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avutil/attributes_internal: Add visibility pragma

GCC 4.0 not only added a visibility attribute, but also
a pragma to set it for a whole region of code.*
This commit exposes this via macros.

*: See https://gcc.gnu.org/gcc-4.0/changes.html

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-10-03 16:22:55 +02:00
parent f3b5277057
commit a60befce40

View File

@ -23,8 +23,12 @@
#if (AV_GCC_VERSION_AT_LEAST(4,0) || defined(__clang__)) && (defined(__ELF__) || defined(__MACH__))
# define attribute_visibility_hidden __attribute__((visibility("hidden")))
# define FF_VISIBILITY_PUSH_HIDDEN _Pragma("GCC visibility push(hidden)")
# define FF_VISIBILITY_POP_HIDDEN _Pragma("GCC visibility pop")
#else
# define attribute_visibility_hidden
# define FF_VISIBILITY_PUSH_HIDDEN
# define FF_VISIBILITY_POP_HIDDEN
#endif
#endif /* AVUTIL_ATTRIBUTES_INTERNAL_H */