diff options
author | Tom Hughes <tomhughes@google.com> | 2023-03-04 00:07:40 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-03-06 15:18:52 (GMT) |
commit | 2ddba266914d6437c313d36f73a4be3a6172e638 (patch) | |
tree | 4be6fe908ed2cd59f4452e679f2c7a7c94e78f64 | |
parent | 0bdd45085ab7e81dc7fc9dc3ac9bb20110be3db7 (diff) | |
download | googletest-2ddba266914d6437c313d36f73a4be3a6172e638.zip googletest-2ddba266914d6437c313d36f73a4be3a6172e638.tar.gz googletest-2ddba266914d6437c313d36f73a4be3a6172e638.tar.bz2 |
Always specify definitions for internal macros
These macros should only be used within googletest, so changing them will not
affect external users.
This allows compiling with -Wundef (#3267).
PiperOrigin-RevId: 513946162
Change-Id: I2f2b7df9123adeba4147593b2b55fde349ccce4f
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 9a35de0..ba90620 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -214,6 +214,14 @@ // GTEST_INTERNAL_HAS_VARIANT - for enabling UniversalPrinter<std::variant> or // UniversalPrinter<absl::variant> // specializations. Always defined to 0 or 1. +// GTEST_USE_OWN_FLAGFILE_FLAG_ - Always defined to 0 or 1. +// GTEST_HAS_CXXABI_H_ - Always defined to 0 or 1. +// GTEST_CAN_STREAM_RESULTS_ - Always defined to 0 or 1. +// GTEST_HAS_ALT_PATH_SEP_ - Always defined to 0 or 1. +// GTEST_WIDE_STRING_USES_UTF16_ - Always defined to 0 or 1. +// GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Always defined to 0 or 1. +// GTEST_HAS_DOWNCAST_ - Always defined to 0 or 1. +// GTEST_HAS_NOTIFICATION_- Always defined to 0 or 1. // // Synchronization: // Mutex, MutexLock, ThreadLocal, GetThreadCount() @@ -305,6 +313,18 @@ #include "gtest/internal/custom/gtest-port.h" #include "gtest/internal/gtest-port-arch.h" +#ifndef GTEST_HAS_DOWNCAST_ +#define GTEST_HAS_DOWNCAST_ 0 +#endif + +#ifndef GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ +#define GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ 0 +#endif + +#ifndef GTEST_HAS_NOTIFICATION_ +#define GTEST_HAS_NOTIFICATION_ 0 +#endif + #ifdef GTEST_HAS_ABSL #include "absl/flags/declare.h" #include "absl/flags/flag.h" |