From e82f06f9f73d09c1a91655361354f3549c703627 Mon Sep 17 00:00:00 2001 From: Vikram Saran Date: Sat, 13 Dec 2025 18:55:03 +0100 Subject: [PATCH] fix: Use correct _WIN32 macro for Windows detection --- include/vsg/core/Export.h | 2 +- src/vsg/io/FileSystem.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/vsg/core/Export.h b/include/vsg/core/Export.h index c5b5941f9d..d43003c6e2 100644 --- a/include/vsg/core/Export.h +++ b/include/vsg/core/Export.h @@ -16,7 +16,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI # pragma warning(disable : 4251) #endif -#if defined(WIN32) +#if defined(_WIN32) # if defined(vsg_EXPORTS) # define VSG_DECLSPEC __declspec(dllexport) # elif defined(VSG_SHARED_LIBRARY) diff --git a/src/vsg/io/FileSystem.cpp b/src/vsg/io/FileSystem.cpp index 45c83fe082..4bbf9e2ce6 100644 --- a/src/vsg/io/FileSystem.cpp +++ b/src/vsg/io/FileSystem.cpp @@ -17,7 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include -#if defined(WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) # include # include # include @@ -223,7 +223,7 @@ Path vsg::executableFilePath() { Path path; -#if defined(WIN32) +#if defined(_WIN32) TCHAR buf[PATH_MAX + 1]; DWORD result = GetModuleFileName(NULL, buf, static_cast(std::size(buf) - 1)); if (result && result < std::size(buf))