Skip to content

Commit

Permalink
Fixed NAN/INFINITY definitions to work on Windows 11 SDK.
Browse files Browse the repository at this point in the history
Fixes: #17308, #17238

Confirmation that this addresses the issue: grpc/grpc#37210 (comment)

PiperOrigin-RevId: 652541857
  • Loading branch information
haberman authored and copybara-github committed Jul 15, 2024
1 parent 00a5a20 commit 0309d86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upb/message/internal/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0309d86

Please sign in to comment.