aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
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/buffer.h
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/buffer.h')
-rw-r--r--src/buffer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 3acf1423816..da40a7ce3d8 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1149,7 +1149,7 @@ BUF_FETCH_MULTIBYTE_CHAR (struct buffer *buf, ptrdiff_t pos)
1149 We assume you know which buffer it's pointing into. */ 1149 We assume you know which buffer it's pointing into. */
1150 1150
1151#define OVERLAY_POSITION(P) \ 1151#define OVERLAY_POSITION(P) \
1152 (MARKERP (P) ? marker_position (P) : (abort (), 0)) 1152 (MARKERP (P) ? marker_position (P) : (emacs_abort (), 0))
1153 1153
1154 1154
1155/*********************************************************************** 1155/***********************************************************************
@@ -1189,7 +1189,7 @@ extern int last_per_buffer_idx;
1189 1189
1190#define PER_BUFFER_VALUE_P(B, IDX) \ 1190#define PER_BUFFER_VALUE_P(B, IDX) \
1191 (((IDX) < 0 || IDX >= last_per_buffer_idx) \ 1191 (((IDX) < 0 || IDX >= last_per_buffer_idx) \
1192 ? (abort (), 0) \ 1192 ? (emacs_abort (), 0) \
1193 : ((B)->local_flags[IDX] != 0)) 1193 : ((B)->local_flags[IDX] != 0))
1194 1194
1195/* Set whether per-buffer variable with index IDX has a buffer-local 1195/* Set whether per-buffer variable with index IDX has a buffer-local
@@ -1198,7 +1198,7 @@ extern int last_per_buffer_idx;
1198#define SET_PER_BUFFER_VALUE_P(B, IDX, VAL) \ 1198#define SET_PER_BUFFER_VALUE_P(B, IDX, VAL) \
1199 do { \ 1199 do { \
1200 if ((IDX) < 0 || (IDX) >= last_per_buffer_idx) \ 1200 if ((IDX) < 0 || (IDX) >= last_per_buffer_idx) \
1201 abort (); \ 1201 emacs_abort (); \
1202 (B)->local_flags[IDX] = (VAL); \ 1202 (B)->local_flags[IDX] = (VAL); \
1203 } while (0) 1203 } while (0)
1204 1204