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.
From: Gerald Pfeifer gerald@pfeifer.com
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. --- libs/capstone/include/capstone/platform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/capstone/include/capstone/platform.h b/libs/capstone/include/capstone/platform.h index a5a4bd235d6..05f730a4ddc 100644 --- a/libs/capstone/include/capstone/platform.h +++ b/libs/capstone/include/capstone/platform.h @@ -6,7 +6,8 @@
// handle C99 issue (for pre-2013 VisualStudio) -#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)) +#if !defined(__GNUC__) \ + && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)) // MSVC
// stdbool.h
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=150433
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 00000000005B00FE, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
This is the very last change to allow building as C23 and with default settings of upcoming GCC 15.
Jacek Caban (@jacek) commented about libs/capstone/include/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)) +#if !defined(__GNUC__) \
- && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64))
All those checks seem needlessly complicated. If we need a local diff anyway, we could just unconditionally include `stdbool.h`. For upstream capstone, I guess it could be just `defined(_MSC_VER)`.