# HG changeset patch # User Jaroslav Hajek # Date 1245822021 -7200 # Node ID 664597f882843224b55eaf0772d45f1836cc2ed7 # Parent 67ad3b58b99a20736f526e13118c026f11191717 workaround sig_atomic_t != int in pt-eval.cc diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-06-24 Jaroslav Hajek + + * pt-eval.cc (do_unwind_protect_cleanup_code): + Workaround sig_atomic_t != int. + 2009-06-23 Jaroslav Hajek * quit.h (octave_quit_exception): Delete. diff --git a/src/pt-eval.cc b/src/pt-eval.cc --- a/src/pt-eval.cc +++ b/src/pt-eval.cc @@ -904,12 +904,18 @@ } } +void restore_interrupt_state (void *ptr) +{ + octave_interrupt_state = *(reinterpret_cast (ptr)); +} + static void do_unwind_protect_cleanup_code (void *ptr) { tree_statement_list *list = static_cast (ptr); - unwind_protect_int (octave_interrupt_state); + sig_atomic_t saved_octave_interrupt_state = octave_interrupt_state; + unwind_protect::add (restore_interrupt_state, &saved_octave_interrupt_state); octave_interrupt_state = 0; // We want to run the cleanup code without error_state being set,