From a4408b13746d0fc9991d818d80a5fa0913f8acd9 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Tue, 20 Jun 2023 09:13:56 -0700 Subject: [PATCH] Internal Code Change PiperOrigin-RevId: 541945479 --- src/google/protobuf/port_def.inc | 2 ++ src/google/protobuf/port_undef.inc | 1 + src/google/protobuf/util/field_comparator.cc | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index c9a72053b3..9a9df71c31 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -939,6 +939,8 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), // Windows declares several inconvenient macro names. We #undef them and then // restore them in port_undef.inc. #ifdef _WIN32 +#pragma push_macro("CompareString") +#undef CompareString #pragma push_macro("CREATE_NEW") #undef CREATE_NEW #pragma push_macro("DELETE") diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc index a0efba1e7c..c52992ca13 100644 --- a/src/google/protobuf/port_undef.inc +++ b/src/google/protobuf/port_undef.inc @@ -144,6 +144,7 @@ #endif #ifdef _WIN32 +#pragma pop_macro("CompareString") #pragma pop_macro("CREATE_NEW") #pragma pop_macro("DELETE") #pragma pop_macro("DOUBLE_CLICK") diff --git a/src/google/protobuf/util/field_comparator.cc b/src/google/protobuf/util/field_comparator.cc index 441770a309..c6b5ac08ee 100644 --- a/src/google/protobuf/util/field_comparator.cc +++ b/src/google/protobuf/util/field_comparator.cc @@ -44,6 +44,9 @@ #include "absl/log/absl_log.h" #include "google/protobuf/util/message_differencer.h" +// Must be included last. +#include "google/protobuf/port_def.inc" + namespace google { namespace protobuf { namespace util { @@ -245,3 +248,5 @@ FieldComparator::ComparisonResult SimpleFieldComparator::ResultFromBoolean( } // namespace util } // namespace protobuf } // namespace google + +#include "google/protobuf/port_undef.inc"