aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-04 10:34:54 -0700
committerPaul Eggert2012-09-04 10:34:54 -0700
commit1088b9226e7dac7314dab52ef0696a5f540900cd (patch)
treebfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/eval.c
parent30934d334e8a67c8992d910428758d5b93e0f04f (diff)
downloademacs-1088b9226e7dac7314dab52ef0696a5f540900cd.tar.gz
emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.zip
Simplify redefinition of 'abort' (Bug#12316).
Do not try to redefine the 'abort' function. Instead, redo the code so that it calls 'emacs_abort' rather than 'abort'. This removes the need for the NO_ABORT configure-time macro and makes it easier to change the abort code to do a backtrace. * configure.ac (NO_ABRT): Remove. * admin/CPP-DEFINES (NO_ABORT): Remove. * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove. * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort. * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]: Remove; sysdep.c's emacs_abort now takes its place. * src/lisp.h (emacs_abort): New decl. All calls from Emacs code to 'abort' changed to use 'emacs_abort'. * src/msdos.c (dos_abort) [defined abort]: Remove; not used. (abort) [!defined abort]: Rename to ... (emacs_abort): ... new name. * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking the place of the old 'abort' in emacs.c. * src/w32.c, src/w32fns.c (abort): Do not #undef. * src/w32.c (emacs_abort): Rename from w32_abort.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c
index 3a4953665e3..1015b013a26 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1493,7 +1493,7 @@ See also the function `condition-case'. */)
1493 immediate_quit = handling_signal = 0; 1493 immediate_quit = handling_signal = 0;
1494 abort_on_gc = 0; 1494 abort_on_gc = 0;
1495 if (gc_in_progress || waiting_for_input) 1495 if (gc_in_progress || waiting_for_input)
1496 abort (); 1496 emacs_abort ();
1497 1497
1498#if 0 /* rms: I don't know why this was here, 1498#if 0 /* rms: I don't know why this was here,
1499 but it is surely wrong for an error that is handled. */ 1499 but it is surely wrong for an error that is handled. */
@@ -1590,7 +1590,7 @@ void
1590xsignal (Lisp_Object error_symbol, Lisp_Object data) 1590xsignal (Lisp_Object error_symbol, Lisp_Object data)
1591{ 1591{
1592 Fsignal (error_symbol, data); 1592 Fsignal (error_symbol, data);
1593 abort (); 1593 emacs_abort ();
1594} 1594}
1595 1595
1596/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */ 1596/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */
@@ -2043,7 +2043,7 @@ eval_sub (Lisp_Object form)
2043 struct gcpro gcpro1, gcpro2, gcpro3; 2043 struct gcpro gcpro1, gcpro2, gcpro3;
2044 2044
2045 if (handling_signal) 2045 if (handling_signal)
2046 abort (); 2046 emacs_abort ();
2047 2047
2048 if (SYMBOLP (form)) 2048 if (SYMBOLP (form))
2049 { 2049 {
@@ -2207,7 +2207,7 @@ eval_sub (Lisp_Object form)
2207 is supported by this code. We need to either rewrite the 2207 is supported by this code. We need to either rewrite the
2208 subr to use a different argument protocol, or add more 2208 subr to use a different argument protocol, or add more
2209 cases to this switch. */ 2209 cases to this switch. */
2210 abort (); 2210 emacs_abort ();
2211 } 2211 }
2212 } 2212 }
2213 } 2213 }
@@ -2850,7 +2850,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2850 /* If a subr takes more than 8 arguments without using MANY 2850 /* If a subr takes more than 8 arguments without using MANY
2851 or UNEVALLED, we need to extend this function to support it. 2851 or UNEVALLED, we need to extend this function to support it.
2852 Until this is done, there is no way to call the function. */ 2852 Until this is done, there is no way to call the function. */
2853 abort (); 2853 emacs_abort ();
2854 } 2854 }
2855 } 2855 }
2856 } 2856 }
@@ -2981,7 +2981,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
2981 lexenv = Qnil; 2981 lexenv = Qnil;
2982 } 2982 }
2983 else 2983 else
2984 abort (); 2984 emacs_abort ();
2985 2985
2986 i = optional = rest = 0; 2986 i = optional = rest = 0;
2987 for (; CONSP (syms_left); syms_left = XCDR (syms_left)) 2987 for (; CONSP (syms_left); syms_left = XCDR (syms_left))
@@ -3195,7 +3195,7 @@ specbind (Lisp_Object symbol, Lisp_Object value)
3195 set_internal (symbol, value, Qnil, 1); 3195 set_internal (symbol, value, Qnil, 1);
3196 break; 3196 break;
3197 } 3197 }
3198 default: abort (); 3198 default: emacs_abort ();
3199 } 3199 }
3200} 3200}
3201 3201