[winpr,platform] add C++ guards for macros

define attributes when included from C++ code
This commit is contained in:
Armin Novak
2026-02-24 17:03:56 +01:00
parent c1d0653c87
commit 3c84d08518

View File

@@ -59,7 +59,11 @@
#endif
// C23 related macros
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201904L)
#if defined(__cplusplus) && (__cplusplus >= 201703L)
#define WINPR_FALLTHROUGH \
(void)0; \
[[fallthrough]];
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201904L)
#define WINPR_FALLTHROUGH \
(void)0; \
[[fallthrough]];