aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-03 16:22:55 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-10 13:43:59 +0200
commita60befce40572d5867e603a71ff274db797b0532 (patch)
tree80097360445e225f0ffe56426ff7020baf15058d
parentf3b5277057ad84071721f01419fe4badeceaff08 (diff)
downloadffmpeg-a60befce40572d5867e603a71ff274db797b0532.tar.gz
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>
-rw-r--r--libavutil/attributes_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/attributes_internal.h b/libavutil/attributes_internal.h
index 9d3d10b63e..3df1ee6af3 100644
--- a/libavutil/attributes_internal.h
+++ b/libavutil/attributes_internal.h
@@ -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 */