Fixed `NAN`/`INFINITY` definitions to work on Windows 11 SDK.

Fixes: https://github.com/protocolbuffers/protobuf/issues/17308, https://github.com/protocolbuffers/protobuf/issues/17238

Confirmation that this addresses the issue: https://github.com/grpc/grpc/issues/37210#issuecomment-2226809722

PiperOrigin-RevId: 652541857
pull/17471/head
Joshua Haberman 4 months ago committed by Copybara-Service
parent 00a5a200e5
commit 0309d86d31
  1. 6
      upb/message/internal/message.c

@ -17,9 +17,9 @@
// Must be last.
#include "upb/port/def.inc"
const float kUpb_FltInfinity = INFINITY;
const double kUpb_Infinity = INFINITY;
const double kUpb_NaN = NAN;
const float kUpb_FltInfinity = (float)(1.0 / 0.0);
const double kUpb_Infinity = 1.0 / 0.0;
const double kUpb_NaN = 0.0 / 0.0;
bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need,
upb_Arena* a) {

Loading…
Cancel
Save