From 96dae165683a97bed0fc1d3375dc9c1c742deee4 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 29 Jul 2026 20:45:29 +0000 Subject: [PATCH] Use std::isfinite in bser.cpp bser.cpp called unqualified isfinite(), relying on the macro. Any include earlier in the TU (here: bser.h -> fmt/format.h) undefines the C classification macros, and the subsequent #include is a no-op due to its include guard, so the call fails to compile. Include and call std::isfinite. This was the only unqualified use of the float-classification family (isnan/isinf/isfinite/isnormal/fpclassify/signbit) in the tree, thirdparty included. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01K6JXw8CwYRiXvqHMBGZRgP --- watchman/bser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watchman/bser.cpp b/watchman/bser.cpp index 0ad5b65..5e6fe53 100644 --- a/watchman/bser.cpp +++ b/watchman/bser.cpp @@ -9,7 +9,7 @@ #include "watchman/Logging.h" #include "watchman/thirdparty/jansson/jansson_private.h" -#include +#include /* * This defines a binary serialization of the JSON data objects in this @@ -533,7 +533,7 @@ class BserParser { double dval; memcpy(&dval, ensure(sizeof(double)), sizeof(dval)); - if (!isfinite(dval)) { + if (!std::isfinite(dval)) { throw BserParseError("reals must be finite"); }