From 638c880c924ff096da26585908d43efcec5f47b3 Mon Sep 17 00:00:00 2001 From: Eli Ofenstein Date: Mon, 31 Aug 2026 12:29:29 -0500 Subject: [PATCH] Fix _WIN32 macro checks Use `#if defined(_WIN32)` instead of `#if _WIN32` to avoid undefined macro warnings on non-Windows platforms. --- Include/httpClient/pal.h | 2 +- Source/Common/utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/httpClient/pal.h b/Include/httpClient/pal.h index cb092f20d..28e0d5ab1 100644 --- a/Include/httpClient/pal.h +++ b/Include/httpClient/pal.h @@ -18,7 +18,7 @@ #include -#if _WIN32 +#if defined(_WIN32) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN diff --git a/Source/Common/utils.h b/Source/Common/utils.h index 7dcc7d06c..6d9942112 100644 --- a/Source/Common/utils.h +++ b/Source/Common/utils.h @@ -183,7 +183,7 @@ class hc_task : public std::enable_shared_from_this static inline int str_icmp(const http_internal_string& left, const http_internal_string& right) { -#if _WIN32 +#if defined(_WIN32) return _stricmp(left.c_str(), right.c_str()); #else return strcasecmp(left.c_str(), right.c_str());