Skip to content

Commit

Permalink
Merge pull request #1078 from pwnall/gtest_api_port
Browse files Browse the repository at this point in the history
Pick up GTEST_API_ definition in gtest/internal/custom/gtest-port.h.
  • Loading branch information
BillyDonahue authored May 11, 2017
2 parents 887d569 + b7cf441 commit 8c7f93f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions googletest/include/gtest/internal/custom/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down
9 changes: 8 additions & 1 deletion googletest/include/gtest/internal/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down

0 comments on commit 8c7f93f

Please sign in to comment.