diff options
author | Victor Costan <pwnall@chromium.org> | 2017-05-04 09:47:19 (GMT) |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2017-05-04 17:19:47 (GMT) |
commit | b7cf4414d9c223137b893902b250660180c83de1 (patch) | |
tree | a3a397cbda73d2cb9ebf99f468d461f8679f07b5 | |
parent | 0ad83afdaa3319dadd9f03299bd62f93e6afe2d3 (diff) | |
download | googletest-b7cf4414d9c223137b893902b250660180c83de1.zip googletest-b7cf4414d9c223137b893902b250660180c83de1.tar.gz googletest-b7cf4414d9c223137b893902b250660180c83de1.tar.bz2 |
Pick up GTEST_API_ definition in gtest/internal/custom/gtest-port.h.refs/pull/1078/head
This makes it possible for a port to define the specifier used for
exported symbols without having to change Google Test.
-rw-r--r-- | googletest/include/gtest/internal/custom/gtest-port.h | 3 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/custom/gtest-port.h b/googletest/include/gtest/internal/custom/gtest-port.h index 7e744bd..c85f5d5 100644 --- a/googletest/include/gtest/internal/custom/gtest-port.h +++ b/googletest/include/gtest/internal/custom/gtest-port.h @@ -61,6 +61,9 @@ // GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) // GTEST_LOCK_EXCLUDED_(locks) // +// Exporting API symbols: +// GTEST_API_ - Specifier for exported symbols. +// // ** Custom implementation starts here ** #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 38a8365..9d2efa3 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -930,6 +930,11 @@ using ::std::tuple_size; #endif // GTEST_HAS_SEH +// GTEST_API_ qualifies all symbols that must be exported. The definitions below +// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in +// gtest/internal/custom/gtest-port.h +#ifndef GTEST_API_ + #ifdef _MSC_VER # if GTEST_LINKED_AS_SHARED_LIBRARY # define GTEST_API_ __declspec(dllimport) @@ -940,9 +945,11 @@ using ::std::tuple_size; # define GTEST_API_ __attribute__((visibility ("default"))) #endif // _MSC_VER +#endif // GTEST_API_ + #ifndef GTEST_API_ # define GTEST_API_ -#endif +#endif // GTEST_API_ #ifdef __GNUC__ // Ask the compiler to never inline a given function. |