summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/crash-u.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-10 10:05:04 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-10 10:05:04 +0200
commit4f90cee0b5a811eb4b9088122183a48b93e4690f (patch)
tree991e599673ef65b8ec8c84e8925ca4dd180c73ca /crawl-ref/source/crash-u.cc
parentef9c582e0152070bdc5d104686ed9cb0cfb25c20 (diff)
downloadcrawl-ref-4f90cee0b5a811eb4b9088122183a48b93e4690f.tar.gz
crawl-ref-4f90cee0b5a811eb4b9088122183a48b93e4690f.zip
Improve conditional #includes in crash-u.cc.
Diffstat (limited to 'crawl-ref/source/crash-u.cc')
-rw-r--r--crawl-ref/source/crash-u.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/crash-u.cc b/crawl-ref/source/crash-u.cc
index ea3c63b8ce..1f258fa8e0 100644
--- a/crawl-ref/source/crash-u.cc
+++ b/crawl-ref/source/crash-u.cc
@@ -11,10 +11,12 @@ REVISION("$Rev$");
#include <signal.h>
#endif
+#if (defined(UNIX) || defined(OSX))
+
#include <cxxabi.h>
-#include <execinfo.h>
#ifdef OSX
+#include <cxxabi.h>
#include <dlfcn.h>
typedef int (*backtrace_t)(void * *, int);
@@ -27,7 +29,11 @@ template <typename TO, typename FROM> TO nasty_cast(FROM f) {
FROM f; TO t;
} u; u.f = f; return u.t;
}
-#endif
+#else
+#include <execinfo.h>
+#endif // OSX
+
+#endif // defined(UNIX) || defined(OSX)
#include "crash.h"