|
@@ -266,6 +266,24 @@ extern "C" {
|
|
|
#include "SDL_utils_c.h"
|
|
|
#include "SDL_hashtable.h"
|
|
|
|
|
|
+/* SDL_ExitProcess is not declared in any public header, although
|
|
|
+ it is shared between some parts of SDL, because we don't want
|
|
|
+ anything calling it without an extremely good reason. */
|
|
|
+#ifdef __WATCOMC__
|
|
|
+extern void SDL_ExitProcess(int exitcode);
|
|
|
+#pragma aux SDL_ExitProcess aborts;
|
|
|
+#endif
|
|
|
+extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
|
|
|
+
|
|
|
+#ifdef HAVE_LIBC
|
|
|
+#define SDL_abort() abort()
|
|
|
+#else
|
|
|
+#define SDL_abort() do { \
|
|
|
+ SDL_TriggerBreakpoint(); \
|
|
|
+ SDL_ExitProcess(42); \
|
|
|
+ } while (0)
|
|
|
+#endif
|
|
|
+
|
|
|
#define PUSH_SDL_ERROR() \
|
|
|
{ char *_error = SDL_strdup(SDL_GetError());
|
|
|
|