The preprocessor condition to cover pre-2013 VisualStudio around C99 support actually also admitted current versions of GCC and breaks GCC in C23 mode.
Address this by explicitly checking for GCC which, by definition, then does not qualify as VisualStudio.
-- v3: capstone: Avoid GCC being treated as old VisualStudio
From: Gerald Pfeifer gerald@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)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150438
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000004DB00FC, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032 win.c:4070: Test failed: Expected active window 0000000001F8015C, got 0000000000000000. win.c:4071: Test failed: Expected focus window 0000000001F8015C, got 0000000000000000.