aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly Donahue <BillyDonahue@users.noreply.github.com>2017-05-10 22:10:01 -0400
committerGitHub <noreply@github.com>2017-05-10 22:10:01 -0400
commit8c7f93fedaca1b0158e67af0f5dd63a044066eab (patch)
treed0458bf62e56cb5c0f0675d51e01d911da44e2b6
parent887d569eb0bac3760cb3adf5877c8284e4d7768e (diff)
parentb7cf4414d9c223137b893902b250660180c83de1 (diff)
downloadgoogletest-8c7f93fedaca1b0158e67af0f5dd63a044066eab.tar.gz
googletest-8c7f93fedaca1b0158e67af0f5dd63a044066eab.tar.bz2
googletest-8c7f93fedaca1b0158e67af0f5dd63a044066eab.zip
Merge pull request #1078 from pwnall/gtest_api_port
Pick up GTEST_API_ definition in gtest/internal/custom/gtest-port.h.
-rw-r--r--googletest/include/gtest/internal/custom/gtest-port.h3
-rw-r--r--googletest/include/gtest/internal/gtest-port.h9
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 7e744bd3..c85f5d58 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 863f6e7b..5e4f8ba8 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -947,6 +947,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)
@@ -957,9 +962,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.