From: mquinson Date: Sun, 7 Aug 2005 23:03:38 +0000 (+0000) Subject: Do not include execinfo.h directly since we cannot be sure that it's here. Paste... X-Git-Tag: v3.3~3724 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9f11ef1761a86b1b1353e30f22430f08aed6181f?hp=cdfdd352ff398ddd9f23fce63497f2ff75dd32ce 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 --- 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 */ \