diff options
author | Yuri Gribov <tetra2005@gmail.com> | 2022-07-03 10:54:39 +0300 |
---|---|---|
committer | Yuri Gribov <tetra2005@gmail.com> | 2022-07-27 21:46:34 +0300 |
commit | 5235554eb4071c798fef9b29f46e9c96970055ea (patch) | |
tree | d9f57aa29bef3f36990a6150bfee9963f2c5ed33 /libarchive | |
parent | a45905b0166713760a2fb4f2e908d7ce47488371 (diff) | |
download | libarchive-5235554eb4071c798fef9b29f46e9c96970055ea.tar.gz |
Hide internal symbols on platforms that support visibility annotations (see discussion in gh-1017).
Diffstat (limited to 'libarchive')
-rw-r--r-- | libarchive/archive.h | 2 | ||||
-rw-r--r-- | libarchive/archive_entry.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libarchive/archive.h b/libarchive/archive.h index 7f58a1f2..dcb8b0df 100644 --- a/libarchive/archive.h +++ b/libarchive/archive.h @@ -120,6 +120,8 @@ typedef ssize_t la_ssize_t; # define __LA_DECL __declspec(dllimport) # endif # endif +#elif defined __LIBARCHIVE_ENABLE_VISIBILITY +# define __LA_DECL __attribute__((visibility("default"))) #else /* Static libraries or non-Windows needs no special declaration. */ # define __LA_DECL diff --git a/libarchive/archive_entry.h b/libarchive/archive_entry.h index 450b3cf9..e579e9f3 100644 --- a/libarchive/archive_entry.h +++ b/libarchive/archive_entry.h @@ -122,6 +122,8 @@ typedef ssize_t la_ssize_t; # define __LA_DECL __declspec(dllimport) # endif # endif +#elif defined __LIBARCHIVE_ENABLE_VISIBILITY +# define __LA_DECL __attribute__((visibility("default"))) #else /* Static libraries on all platforms and shared libraries on non-Windows. */ # define __LA_DECL |