Branch: Tag:

2015-11-27

2015-11-27 19:14:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Revert "setjmp and longjmp are standardized C89."

This reverts commit 0e9cd75e000d4d87c212721cb3494f609632807c.

They are standardized, but we only use them as fallback if sigsetjmp()
doesn't exist.

2645:   #endif /* PROFILING */   }    - static void restore_catching_eval_jmpbuf (jmp_buf *p) + static void restore_catching_eval_jmpbuf (LOW_JMP_BUF *p)   {    Pike_interpreter.catching_eval_jmpbuf = p;   }
2653:   PMOD_EXPORT void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    /* Save and clear Pike_interpreter.catching_eval_jmpbuf so that the -  * following eval_instruction will install a jmp_buf of its own to -  * handle catches. */ -  jmp_buf *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf; +  * following eval_instruction will install a LOW_JMP_BUF of its +  * own to handle catches. */ +  LOW_JMP_BUF *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf;    ONERROR uwp;    Pike_interpreter.catching_eval_jmpbuf = NULL;    SET_ONERROR (uwp, restore_catching_eval_jmpbuf, saved_jmpbuf);
2680:   PMOD_EXPORT void mega_apply_low(INT32 args, void *arg1, ptrdiff_t arg2)   {    /* Save and clear Pike_interpreter.catching_eval_jmpbuf so that the -  * following eval_instruction will install a jmp_buf of its own to -  * handle catches. */ -  jmp_buf *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf; +  * following eval_instruction will install a LOW_JMP_BUF of its +  * own to handle catches. */ +  LOW_JMP_BUF *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf;    ONERROR uwp;    Pike_interpreter.catching_eval_jmpbuf = NULL;    SET_ONERROR (uwp, restore_catching_eval_jmpbuf, saved_jmpbuf);
2709:    */   static int catching_eval_instruction (PIKE_OPCODE_T *pc)   { -  jmp_buf jmpbuf; +  LOW_JMP_BUF jmpbuf;   #ifdef PIKE_DEBUG    if (Pike_interpreter.catching_eval_jmpbuf)    Pike_fatal ("catching_eval_jmpbuf already active.\n");   #endif    Pike_interpreter.catching_eval_jmpbuf = &jmpbuf; -  if (setjmp (jmpbuf)) +  if (LOW_SETJMP (jmpbuf))    {    Pike_interpreter.catching_eval_jmpbuf = NULL;   #ifdef PIKE_DEBUG
2830:    volatile int use_dummy_reference = 1;    struct program *prog = o->prog;    int p_flags = prog->flags; -  jmp_buf *saved_jmpbuf; +  LOW_JMP_BUF *saved_jmpbuf;    int fun = -1;       /* Search for a function that belongs to the current program,