pike.git / src / pike_error.h

version» Context lines:

pike.git/src/pike_error.h:19:    abort();   }      #define Pike_error Pike_fatal      #else /* !CONFIGURE_TEST */      #include "global.h"   #include <setjmp.h>    + #if defined(HAVE_SIGSETJMP) && defined(HAVE_SIGLONGJMP) + #define HAVE_AND_USE_SIGSETJMP + #define LOW_JMP_BUF sigjmp_buf + #define LOW_SETJMP(X) sigsetjmp(X, 0) + #define LOW_LONGJMP(X, Y) siglongjmp(X, Y) + #elif defined(HAVE__SETJMP) && defined(HAVE__LONGJMP) + #define HAVE_AND_USE__SETJMP + #define LOW_JMP_BUF jmp_buf + #define LOW_SETJMP(X) _setjmp(X) + #define LOW_LONGJMP(X, Y) _longjmp(X, Y) + #else + /* Assume we have setjmp and longjmp, they are after all defined by ANSI C. */ + #define HAVE_AND_USE_SETJMP + #define LOW_JMP_BUF jmp_buf + #define LOW_SETJMP(X) setjmp(X) + #define LOW_LONGJMP(X, Y) longjmp(X, Y) + #endif +    #if 1   PMOD_EXPORT extern const char msg_fatal_error[];   #define Pike_fatal \    (fprintf(stderr,msg_fatal_error,__FILE__,(long)__LINE__),debug_fatal)   #else   /* This is useful when debugging assembler code sometimes... -Hubbe */   #define Pike_fatal \    (fprintf(stderr,"%s: Fatal error:\n",__FILE__ ":" DEFINETOSTR(__LINE__) ),debug_fatal)   #endif   
pike.git/src/pike_error.h:80: Inside #if defined(PIKE_DEBUG)
   void *arg;   #ifdef PIKE_DEBUG    const char *file;    int line;   #endif /* PIKE_DEBUG */   } ONERROR;      typedef struct JMP_BUF   {    struct JMP_BUF *previous; -  jmp_buf recovery; +  LOW_JMP_BUF recovery;    struct pike_frame *frame_pointer;    ptrdiff_t stack_pointer;    ptrdiff_t mark_sp;    INT32 severity;    ONERROR *onerror;   #ifdef PIKE_DEBUG    int line;    const char *file;    int on_stack;   #endif
pike.git/src/pike_error.h:121:    check_recovery_context(); \    }while (0)      #ifdef DMALLOC_LOCATION   #define PERR_LOCATION() DMALLOC_LOCATION()   #else   #define PERR_LOCATION() ( __FILE__ ":" DEFINETOSTR(__LINE__) )   #endif      #define DEBUG_INIT_REC_ARGS , int on_stack, const char *location - #define SETJMP(X) setjmp(init_recovery(&X, 0, 1, PERR_LOCATION())->recovery) + #define SETJMP(X) LOW_SETJMP((init_recovery(&X, 0, 1, PERR_LOCATION())->recovery))   #define SETJMP_SP(jmp, stack_pop_levels) \ -  setjmp(init_recovery(&jmp, stack_pop_levels, 1, PERR_LOCATION())->recovery) +  LOW_SETJMP((init_recovery(&jmp, stack_pop_levels, 1, PERR_LOCATION())->recovery))   #else /* !PIKE_DEBUG */   #define DEBUG_INIT_REC_ARGS - #define SETJMP(X) setjmp(init_recovery(&X, 0)->recovery) + #define SETJMP(X) LOW_SETJMP((init_recovery(&X, 0)->recovery))   #define SETJMP_SP(jmp, stack_pop_levels) \ -  setjmp(init_recovery(&jmp, stack_pop_levels)->recovery) +  LOW_SETJMP((init_recovery(&jmp, stack_pop_levels)->recovery))   #define UNSETJMP(X) Pike_interpreter.recoveries=X.previous   #endif /* !PIKE_DEBUG */         #ifdef PIKE_DEBUG   #define SET_ONERROR(X,Y,Z) \    do{ \    check_recovery_context(); \    OED_FPRINTF((stderr, "SET_ONERROR(%p, %p, %p) %s:%d\n", \    &(X), (Y), (void *)(Z), __FILE__, __LINE__)); \