Skip to content

Commit e47544a

Browse files
Abseil Teamcopybara-github
Abseil Team
authored andcommitted
Resolve -Wundef triggering on GTEST_CREATE_SHARED_LIBRARY and GTEST_LINKED_AS_SHARED_LIBRARY with shared libraries in GoogleTest
Fixes: #4372 PiperOrigin-RevId: 568327612 Change-Id: Ifc47f1a2a2648c29858a22966331557cc928cc47
1 parent 5bd0f08 commit e47544a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

googletest/include/gtest/internal/gtest-port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
845845
#ifndef GTEST_API_
846846

847847
#ifdef _MSC_VER
848-
#if GTEST_LINKED_AS_SHARED_LIBRARY
848+
#if defined(GTEST_LINKED_AS_SHARED_LIBRARY) && GTEST_LINKED_AS_SHARED_LIBRARY
849849
#define GTEST_API_ __declspec(dllimport)
850-
#elif GTEST_CREATE_SHARED_LIBRARY
850+
#elif defined(GTEST_CREATE_SHARED_LIBRARY) && GTEST_CREATE_SHARED_LIBRARY
851851
#define GTEST_API_ __declspec(dllexport)
852852
#endif
853853
#elif GTEST_HAVE_ATTRIBUTE_(visibility)

0 commit comments

Comments
 (0)