-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add support for including SDL3 headers in older toolchains #11900
Conversation
Some older toolchains don't support 'long long'.
Let's have the headers automatically define SDL_NOLONGLONG if _MSC_VER <= whatever Visual C++ 6.0 sets it to. @sezero, I assume Watcom has "long long", right? |
Versions of it that matter (e.g. >= 1.9, maybe even older) do. |
E.g.: The Makefile.w32 in sdl2-compat has been working since |
About the introduction of I also don't know what MSVC version introduced |
vs2005, at least, has it, if I recall correctly |
Visual Studio.NET 2003 is the first to support it. _MSC_VER == 1310 (decimal, not hex). |
While you maybe still have the old toolchaibs set up, are the minimum versions I used for _BitScanReverse and __debugbreak correct? |
Maybe add the following for old MSVC versions? (not tested) --- SDL_assert.h~
+++ SDL_assert.h
@@ -131,6 +131,8 @@
/* Don't include intrin.h here because it contains C++ code */
extern void __cdecl __debugbreak(void);
#define SDL_TriggerBreakpoint() __debugbreak()
+#elif defined(_MSC_VER) && defined(_M_IX86)
+ #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
#elif defined(ANDROID)
#include <assert.h>
#define SDL_TriggerBreakpoint() assert(0) |
Go ahead and commit it, if someone actually reports it failing on Visual C++ 6.0, we'll fix it as the highest priority. :) |
Done as 61f13b9
Yes, with very most highest priority :)) |
On unknown platforms, Lines 156 to 159 in 82125ec
I think this might surprise people. |
Good point, let's remove that. |
With these patches, I can successfully use the SDL3 headers with MSVC 6 (from 1998).
Description
Existing Issue(s)