diff options
| author | Paul Eggert | 2012-09-04 10:34:54 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-04 10:34:54 -0700 |
| commit | 1088b9226e7dac7314dab52ef0696a5f540900cd (patch) | |
| tree | bfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/process.c | |
| parent | 30934d334e8a67c8992d910428758d5b93e0f04f (diff) | |
| download | emacs-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/process.c')
| -rw-r--r-- | src/process.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c index 2d144b410ed..5677da36881 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1577,7 +1577,7 @@ static Lisp_Object | |||
| 1577 | start_process_unwind (Lisp_Object proc) | 1577 | start_process_unwind (Lisp_Object proc) |
| 1578 | { | 1578 | { |
| 1579 | if (!PROCESSP (proc)) | 1579 | if (!PROCESSP (proc)) |
| 1580 | abort (); | 1580 | emacs_abort (); |
| 1581 | 1581 | ||
| 1582 | /* Was PROC started successfully? | 1582 | /* Was PROC started successfully? |
| 1583 | -2 is used for a pty with no process, eg for gdb. */ | 1583 | -2 is used for a pty with no process, eg for gdb. */ |
| @@ -2550,7 +2550,7 @@ static Lisp_Object | |||
| 2550 | make_serial_process_unwind (Lisp_Object proc) | 2550 | make_serial_process_unwind (Lisp_Object proc) |
| 2551 | { | 2551 | { |
| 2552 | if (!PROCESSP (proc)) | 2552 | if (!PROCESSP (proc)) |
| 2553 | abort (); | 2553 | emacs_abort (); |
| 2554 | remove_process (proc); | 2554 | remove_process (proc); |
| 2555 | return Qnil; | 2555 | return Qnil; |
| 2556 | } | 2556 | } |
| @@ -3387,7 +3387,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3387 | if (socktype == SOCK_DGRAM) | 3387 | if (socktype == SOCK_DGRAM) |
| 3388 | { | 3388 | { |
| 3389 | if (datagram_address[s].sa) | 3389 | if (datagram_address[s].sa) |
| 3390 | abort (); | 3390 | emacs_abort (); |
| 3391 | datagram_address[s].sa = xmalloc (lres->ai_addrlen); | 3391 | datagram_address[s].sa = xmalloc (lres->ai_addrlen); |
| 3392 | datagram_address[s].len = lres->ai_addrlen; | 3392 | datagram_address[s].len = lres->ai_addrlen; |
| 3393 | if (is_server) | 3393 | if (is_server) |
| @@ -3973,7 +3973,7 @@ deactivate_process (Lisp_Object proc) | |||
| 3973 | FD_CLR (inchannel, &connect_wait_mask); | 3973 | FD_CLR (inchannel, &connect_wait_mask); |
| 3974 | FD_CLR (inchannel, &write_mask); | 3974 | FD_CLR (inchannel, &write_mask); |
| 3975 | if (--num_pending_connects < 0) | 3975 | if (--num_pending_connects < 0) |
| 3976 | abort (); | 3976 | emacs_abort (); |
| 3977 | } | 3977 | } |
| 3978 | #endif | 3978 | #endif |
| 3979 | if (inchannel == max_process_desc) | 3979 | if (inchannel == max_process_desc) |
| @@ -4752,7 +4752,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4752 | Cleanup occurs c/o status_notify after SIGCLD. */ | 4752 | Cleanup occurs c/o status_notify after SIGCLD. */ |
| 4753 | no_avail = 1; /* Cannot depend on values returned */ | 4753 | no_avail = 1; /* Cannot depend on values returned */ |
| 4754 | #else | 4754 | #else |
| 4755 | abort (); | 4755 | emacs_abort (); |
| 4756 | #endif | 4756 | #endif |
| 4757 | } | 4757 | } |
| 4758 | else | 4758 | else |
| @@ -4993,7 +4993,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4993 | FD_CLR (channel, &connect_wait_mask); | 4993 | FD_CLR (channel, &connect_wait_mask); |
| 4994 | FD_CLR (channel, &write_mask); | 4994 | FD_CLR (channel, &write_mask); |
| 4995 | if (--num_pending_connects < 0) | 4995 | if (--num_pending_connects < 0) |
| 4996 | abort (); | 4996 | emacs_abort (); |
| 4997 | 4997 | ||
| 4998 | proc = chan_process[channel]; | 4998 | proc = chan_process[channel]; |
| 4999 | if (NILP (proc)) | 4999 | if (NILP (proc)) |
| @@ -6354,7 +6354,7 @@ process has been transmitted to the serial port. */) | |||
| 6354 | #endif /* not HAVE_SHUTDOWN */ | 6354 | #endif /* not HAVE_SHUTDOWN */ |
| 6355 | new_outfd = emacs_open (NULL_DEVICE, O_WRONLY, 0); | 6355 | new_outfd = emacs_open (NULL_DEVICE, O_WRONLY, 0); |
| 6356 | if (new_outfd < 0) | 6356 | if (new_outfd < 0) |
| 6357 | abort (); | 6357 | emacs_abort (); |
| 6358 | old_outfd = XPROCESS (proc)->outfd; | 6358 | old_outfd = XPROCESS (proc)->outfd; |
| 6359 | 6359 | ||
| 6360 | if (!proc_encode_coding_system[new_outfd]) | 6360 | if (!proc_encode_coding_system[new_outfd]) |