Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using MSVC-internal _STRINGIZE #499

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions 3rdparty/stout/include/stout/abort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@

#include <stout/attributes.hpp>

// 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__)

Expand Down