diff options
author | Andreas Schuh <andreas.schuh.84@gmail.com> | 2018-11-09 17:46:42 +0000 |
---|---|---|
committer | Andreas Schuh <andreas.schuh.84@gmail.com> | 2018-11-11 20:35:02 +0000 |
commit | 4c0bbc0604c99a077aff91e10948befc073c4640 (patch) | |
tree | 86e74e477594248244458ab5573f0c3a9cf332cd /src | |
parent | 0c7012d647c783e38c47f137eb51f9677ae161c4 (diff) | |
download | gflags-4c0bbc0604c99a077aff91e10948befc073c4640.tar.gz |
fix: Use 'default' visibility for GCC
Diffstat (limited to 'src')
-rw-r--r-- | src/config.h | 2 | ||||
-rw-r--r-- | src/gflags_declare.h.in | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index b90b7e6..c33d207 100644 --- a/src/config.h +++ b/src/config.h @@ -36,6 +36,8 @@ #ifndef GFLAGS_DLL_DECL # if GFLAGS_IS_A_DLL && defined(_MSC_VER) # define GFLAGS_DLL_DECL __declspec(dllexport) +# elif defined(__GNUC__) && __GNUC__ >= 4 +# define GFLAGS_DLL_DECL __attribute__((visibility("default"))) # else # define GFLAGS_DLL_DECL # endif diff --git a/src/gflags_declare.h.in b/src/gflags_declare.h.in index 752a34d..ab7bd24 100644 --- a/src/gflags_declare.h.in +++ b/src/gflags_declare.h.in @@ -58,6 +58,8 @@ #ifndef GFLAGS_DLL_DECL # if GFLAGS_IS_A_DLL && defined(_MSC_VER) # define GFLAGS_DLL_DECL __declspec(dllimport) +# elif defined(__GNUC__) && __GNUC__ >= 4 +# define GFLAGS_DLL_DECL __attribute__((visibility("default"))) # else # define GFLAGS_DLL_DECL # endif @@ -67,6 +69,8 @@ #ifndef GFLAGS_DLL_DECLARE_FLAG # if GFLAGS_IS_A_DLL && defined(_MSC_VER) # define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport) +# elif defined(__GNUC__) && __GNUC__ >= 4 +# define GFLAGS_DLL_DECLARE_FLAG __attribute__((visibility("default"))) # else # define GFLAGS_DLL_DECLARE_FLAG # endif |