From: Gerald Pfeifer <gerald(a)pfeifer.com> The preprocessor condition to cover pre-2013 VisualStudio related to C99 support actually also admitted current versions of GCC and breaks GCC in C23 mode. Address this by dropping the complicated checks and assuming a modern toolchain, simply including <stdbool.h>. --- libs/capstone/include/capstone/platform.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/libs/capstone/include/capstone/platform.h b/libs/capstone/include/capstone/platform.h index a5a4bd235d6..8f7cc711890 100644 --- a/libs/capstone/include/capstone/platform.h +++ b/libs/capstone/include/capstone/platform.h @@ -4,30 +4,7 @@ #ifndef CAPSTONE_PLATFORM_H #define CAPSTONE_PLATFORM_H - -// handle C99 issue (for pre-2013 VisualStudio) -#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)) -// MSVC - -// stdbool.h -#if (_MSC_VER < 1800) || defined(_KERNEL_MODE) -// this system does not have stdbool.h -#ifndef __cplusplus -typedef unsigned char bool; -#define false 0 -#define true 1 -#endif // __cplusplus - -#else -// VisualStudio 2013+ -> C99 is supported #include <stdbool.h> -#endif // (_MSC_VER < 1800) || defined(_KERNEL_MODE) - -#else -// not MSVC -> C99 is supported -#include <stdbool.h> -#endif // !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)) - // handle inttypes.h / stdint.h compatibility #if defined(_WIN32_WCE) && (_WIN32_WCE < 0x800) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7040