Workaround `SERVICE_STOP` macro definition on WIN32.

One of the [GCP proto files](https://github.com/googleapis/googleapis/blob/master/google/cloud/securitycenter/v1/mitre_attack.proto#L186) recently introduce a message enum field named `SERVICE_STOP`.  Unfortunately this clashes with a macro from `winsvc.h`, so add `SERVICE_STOP` to the push/undef/pop wrappers.

PiperOrigin-RevId: 611231375
pull/15986/head
Protobuf Team Bot 9 months ago committed by Copybara-Service
parent 1f1e7e754c
commit 670e014065
  1. 2
      src/google/protobuf/port_def.inc
  2. 1
      src/google/protobuf/port_undef.inc

@ -825,6 +825,8 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
#undef REASON_UNKNOWN #undef REASON_UNKNOWN
#pragma push_macro("SERVICE_DISABLED") #pragma push_macro("SERVICE_DISABLED")
#undef SERVICE_DISABLED #undef SERVICE_DISABLED
#pragma push_macro("SERVICE_STOP")
#undef SERVICE_STOP
#pragma push_macro("SEVERITY_ERROR") #pragma push_macro("SEVERITY_ERROR")
#undef SEVERITY_ERROR #undef SEVERITY_ERROR
#pragma push_macro("STATUS_PENDING") #pragma push_macro("STATUS_PENDING")

@ -136,6 +136,7 @@
#pragma pop_macro("NO_ERROR") #pragma pop_macro("NO_ERROR")
#pragma pop_macro("REASON_UNKNOWN") #pragma pop_macro("REASON_UNKNOWN")
#pragma pop_macro("SERVICE_DISABLED") #pragma pop_macro("SERVICE_DISABLED")
#pragma pop_macro("SERVICE_STOP")
#pragma pop_macro("SEVERITY_ERROR") #pragma pop_macro("SEVERITY_ERROR")
#pragma pop_macro("STRICT") #pragma pop_macro("STRICT")
#pragma pop_macro("STATUS_PENDING") #pragma pop_macro("STATUS_PENDING")

Loading…
Cancel
Save