diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-09-04 10:34:54 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-09-04 10:34:54 -0700 |
commit | 1088b9226e7dac7314dab52ef0696a5f540900cd (patch) | |
tree | bfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/terminal.c | |
parent | 30934d334e8a67c8992d910428758d5b93e0f04f (diff) | |
download | emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.tar.gz |
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/terminal.c')
-rw-r--r-- | src/terminal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/terminal.c b/src/terminal.c index d94164a4e40..c51a18dfa61 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -294,7 +294,7 @@ delete_terminal (struct terminal *terminal) for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal) if (! *tp) - abort (); + emacs_abort (); *tp = terminal->next_terminal; xfree (terminal->keyboard_coding); @@ -411,7 +411,7 @@ possible return values. */) case output_ns: return Qns; default: - abort (); + emacs_abort (); } } @@ -519,7 +519,7 @@ struct terminal * init_initial_terminal (void) { if (initialized || terminal_list || tty_list) - abort (); + emacs_abort (); initial_terminal = create_terminal (); initial_terminal->type = output_initial; @@ -538,7 +538,7 @@ static void delete_initial_terminal (struct terminal *terminal) { if (terminal != initial_terminal) - abort (); + emacs_abort (); delete_terminal (terminal); initial_terminal = NULL; |