From 9f11ef1761a86b1b1353e30f22430f08aed6181f Mon Sep 17 00:00:00 2001 From: mquinson Date: Sun, 7 Aug 2005 23:03:38 +0000 Subject: [PATCH 1/1] Do not include execinfo.h directly since we cannot be sure that it's here. Paste the relevant part here instead (plus do not do any assertion about available exception propagation mecanism so far) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1632 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/ex.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/xbt/ex.h b/include/xbt/ex.h index 45225b2dbb..14ebbe7b51 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -35,12 +35,16 @@ #include #include +/* do not include execinfo.h directly since it's not always available. + Instead, copy the parts we need (and fake when it's not there) */ +extern int backtrace (void **__array, int __size); + /* required ISO-C standard facilities */ #include #include //#define __EX_MCTX_MCSC__ 1 -#define __EX_MCTX_SSJLJ__ 1 +//#define __EX_MCTX_SSJLJ__ 1 /* the machine context */ #if defined(__EX_MCTX_MCSC__) #include /* POSIX.1 ucontext(3) */ @@ -343,7 +347,7 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e) __attribute__((__noreturn__ * The THROW can be performed everywhere, including inside TRY, * CLEANUP and CATCH blocks. */ -#include + #define _THROW(c,v,m) \ do { /* change this sequence into one block */ \ /* build the exception */ \ -- 2.20.1