diff --git a/include/sys.h b/include/sys.h index 369996b8f..12606d352 100644 --- a/include/sys.h +++ b/include/sys.h @@ -220,4 +220,12 @@ typedef unsigned __int32 uint32_t; #define __attribute__(x) /* nothing */ #endif +/* A normal abort() on windows causes the crucial stack frame to be missing + * from the stack trace, IOTW: you don't see where abort() was called! + * It's silly but this works: + */ +#ifdef _WIN32 + #define abort(x) do { char *crash = NULL; *crash = 'x'; } while(0) +#endif + #endif /* __sys_include__ */