From 2eda1cb285340b4ea7bb5b1fbc3be802877efc4e Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 3 Apr 2016 20:13:58 +0200 Subject: [PATCH] Windows... --- include/sys.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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__ */