From ff5221b693893eab4f312597b8d507beb178eda8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 6 May 2021 22:33:41 +0100 Subject: [PATCH] Fix warning about testing _WIN64 which might be undefined This warning is disabled by default, but is pretty useful and worth enabling for MSVC, just as -Wundef for gcc, so fix it in Win32 build. --- include/spdlog/details/os-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index 4ed0fa69..6df89565 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -214,7 +214,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) } #if defined(_WIN32) && !defined(__CYGWIN__) int fd = ::_fileno(f); -#if _WIN64 // 64 bits +#if defined(_WIN64) // 64 bits __int64 ret = ::_filelengthi64(fd); if (ret >= 0) {