summaryrefslogtreecommitdiffstats
path: root/googletest/include
diff options
context:
space:
mode:
authorDominic Meiser <dmeiser@txcorp.com>2015-10-05 21:27:17 (GMT)
committerDominic Meiser <dmeiser@txcorp.com>2015-10-30 03:55:46 (GMT)
commitbb5c92f9d1f0b26c79978e92f38a0e5fbcc8c9bf (patch)
tree7f45fe9863dce761e3b22634fd20d365f7f81c69 /googletest/include
parent43359642a1c16ad3f4fc575c7edd0cb935810815 (diff)
downloadgoogletest-bb5c92f9d1f0b26c79978e92f38a0e5fbcc8c9bf.zip
googletest-bb5c92f9d1f0b26c79978e92f38a0e5fbcc8c9bf.tar.gz
googletest-bb5c92f9d1f0b26c79978e92f38a0e5fbcc8c9bf.tar.bz2
Fix definition of GTEST_API_ macro for gcc and clang [#451].
This is to enable using gtest with -fvisibility=hidden.
Diffstat (limited to 'googletest/include')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 141d457..d768bd6 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -920,14 +920,14 @@ using ::std::tuple_size;
#endif // GTEST_HAS_SEH
#ifdef _MSC_VER
-
# if GTEST_LINKED_AS_SHARED_LIBRARY
# define GTEST_API_ __declspec(dllimport)
# elif GTEST_CREATE_SHARED_LIBRARY
# define GTEST_API_ __declspec(dllexport)
# endif
-
-#endif // _MSC_VER
+#elif __GNUC__ >= 4 || defined(__clang__)
+# define GTEST_API_ __attribute__((visibility ("default")))
+#endif // _MSC_VER
#ifndef GTEST_API_
# define GTEST_API_