From b808a15b6d46e720ee919c8fbedca74d2e487026 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 29 Feb 2024 15:31:33 -0800 Subject: [PATCH] Avoid using MSVC-internal `_STRINGIZE`. --- 3rdparty/stout/include/stout/abort.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/3rdparty/stout/include/stout/abort.hpp b/3rdparty/stout/include/stout/abort.hpp index 19171060ae1..b33905d77ea 100644 --- a/3rdparty/stout/include/stout/abort.hpp +++ b/3rdparty/stout/include/stout/abort.hpp @@ -28,14 +28,11 @@ #include -// NOTE: These macros are already defined in Visual Studio (Windows) headers. -#ifndef __WINDOWS__ -#define __STRINGIZE(x) #x -#define _STRINGIZE(x) __STRINGIZE(x) -#endif // __WINDOWS__ +#define STOUT_STRINGIZE_IMPL(x) #x +#define STOUT_STRINGIZE(x) STOUT_STRINGIZE_IMPL(x) // Signal safe abort which prints a message. -#define _ABORT_PREFIX "ABORT: (" __FILE__ ":" _STRINGIZE(__LINE__) "): " +#define _ABORT_PREFIX "ABORT: (" __FILE__ ":" STOUT_STRINGIZE(__LINE__) "): " #define ABORT(...) _Abort(_ABORT_PREFIX, __VA_ARGS__)