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/data.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/data.c')
| -rw-r--r-- | src/data.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/data.c b/src/data.c index d8b7f42ea3f..415a8962350 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -108,7 +108,7 @@ wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) | |||
| 108 | to try and do that by checking the tagbits, but nowadays all | 108 | to try and do that by checking the tagbits, but nowadays all |
| 109 | tagbits are potentially valid. */ | 109 | tagbits are potentially valid. */ |
| 110 | /* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit) | 110 | /* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit) |
| 111 | * abort (); */ | 111 | * emacs_abort (); */ |
| 112 | 112 | ||
| 113 | xsignal2 (Qwrong_type_argument, predicate, value); | 113 | xsignal2 (Qwrong_type_argument, predicate, value); |
| 114 | } | 114 | } |
| @@ -182,7 +182,7 @@ for example, (type-of 1) returns `integer'. */) | |||
| 182 | case Lisp_Misc_Float: | 182 | case Lisp_Misc_Float: |
| 183 | return Qfloat; | 183 | return Qfloat; |
| 184 | } | 184 | } |
| 185 | abort (); | 185 | emacs_abort (); |
| 186 | 186 | ||
| 187 | case Lisp_Vectorlike: | 187 | case Lisp_Vectorlike: |
| 188 | if (WINDOW_CONFIGURATIONP (object)) | 188 | if (WINDOW_CONFIGURATIONP (object)) |
| @@ -217,7 +217,7 @@ for example, (type-of 1) returns `integer'. */) | |||
| 217 | return Qfloat; | 217 | return Qfloat; |
| 218 | 218 | ||
| 219 | default: | 219 | default: |
| 220 | abort (); | 220 | emacs_abort (); |
| 221 | } | 221 | } |
| 222 | } | 222 | } |
| 223 | 223 | ||
| @@ -551,7 +551,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | |||
| 551 | /* In set_internal, we un-forward vars when their value is | 551 | /* In set_internal, we un-forward vars when their value is |
| 552 | set to Qunbound. */ | 552 | set to Qunbound. */ |
| 553 | return Qt; | 553 | return Qt; |
| 554 | default: abort (); | 554 | default: emacs_abort (); |
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | return (EQ (valcontents, Qunbound) ? Qnil : Qt); | 557 | return (EQ (valcontents, Qunbound) ? Qnil : Qt); |
| @@ -864,7 +864,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents) | |||
| 864 | don't think anything will break. --lorentey */ | 864 | don't think anything will break. --lorentey */ |
| 865 | return *(Lisp_Object *)(XKBOARD_OBJFWD (valcontents)->offset | 865 | return *(Lisp_Object *)(XKBOARD_OBJFWD (valcontents)->offset |
| 866 | + (char *)FRAME_KBOARD (SELECTED_FRAME ())); | 866 | + (char *)FRAME_KBOARD (SELECTED_FRAME ())); |
| 867 | default: abort (); | 867 | default: emacs_abort (); |
| 868 | } | 868 | } |
| 869 | } | 869 | } |
| 870 | 870 | ||
| @@ -950,7 +950,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 950 | break; | 950 | break; |
| 951 | 951 | ||
| 952 | default: | 952 | default: |
| 953 | abort (); /* goto def; */ | 953 | emacs_abort (); /* goto def; */ |
| 954 | } | 954 | } |
| 955 | } | 955 | } |
| 956 | 956 | ||
| @@ -1055,7 +1055,7 @@ find_symbol_value (Lisp_Object symbol) | |||
| 1055 | /* FALLTHROUGH */ | 1055 | /* FALLTHROUGH */ |
| 1056 | case SYMBOL_FORWARDED: | 1056 | case SYMBOL_FORWARDED: |
| 1057 | return do_symval_forwarding (SYMBOL_FWD (sym)); | 1057 | return do_symval_forwarding (SYMBOL_FWD (sym)); |
| 1058 | default: abort (); | 1058 | default: emacs_abort (); |
| 1059 | } | 1059 | } |
| 1060 | } | 1060 | } |
| 1061 | 1061 | ||
| @@ -1265,7 +1265,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, | |||
| 1265 | store_symval_forwarding (/* sym, */ innercontents, newval, buf); | 1265 | store_symval_forwarding (/* sym, */ innercontents, newval, buf); |
| 1266 | break; | 1266 | break; |
| 1267 | } | 1267 | } |
| 1268 | default: abort (); | 1268 | default: emacs_abort (); |
| 1269 | } | 1269 | } |
| 1270 | return; | 1270 | return; |
| 1271 | } | 1271 | } |
| @@ -1316,7 +1316,7 @@ default_value (Lisp_Object symbol) | |||
| 1316 | /* For other variables, get the current value. */ | 1316 | /* For other variables, get the current value. */ |
| 1317 | return do_symval_forwarding (valcontents); | 1317 | return do_symval_forwarding (valcontents); |
| 1318 | } | 1318 | } |
| 1319 | default: abort (); | 1319 | default: emacs_abort (); |
| 1320 | } | 1320 | } |
| 1321 | } | 1321 | } |
| 1322 | 1322 | ||
| @@ -1414,7 +1414,7 @@ for this variable. */) | |||
| 1414 | else | 1414 | else |
| 1415 | return Fset (symbol, value); | 1415 | return Fset (symbol, value); |
| 1416 | } | 1416 | } |
| 1417 | default: abort (); | 1417 | default: emacs_abort (); |
| 1418 | } | 1418 | } |
| 1419 | } | 1419 | } |
| 1420 | 1420 | ||
| @@ -1538,7 +1538,7 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1538 | else if (BUFFER_OBJFWDP (valcontents.fwd)) | 1538 | else if (BUFFER_OBJFWDP (valcontents.fwd)) |
| 1539 | return variable; | 1539 | return variable; |
| 1540 | break; | 1540 | break; |
| 1541 | default: abort (); | 1541 | default: emacs_abort (); |
| 1542 | } | 1542 | } |
| 1543 | 1543 | ||
| 1544 | if (sym->constant) | 1544 | if (sym->constant) |
| @@ -1611,7 +1611,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) | |||
| 1611 | error ("Symbol %s may not be buffer-local", | 1611 | error ("Symbol %s may not be buffer-local", |
| 1612 | SDATA (SYMBOL_NAME (variable))); | 1612 | SDATA (SYMBOL_NAME (variable))); |
| 1613 | break; | 1613 | break; |
| 1614 | default: abort (); | 1614 | default: emacs_abort (); |
| 1615 | } | 1615 | } |
| 1616 | 1616 | ||
| 1617 | if (sym->constant) | 1617 | if (sym->constant) |
| @@ -1718,7 +1718,7 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) | |||
| 1718 | if (blv->frame_local) | 1718 | if (blv->frame_local) |
| 1719 | return variable; | 1719 | return variable; |
| 1720 | break; | 1720 | break; |
| 1721 | default: abort (); | 1721 | default: emacs_abort (); |
| 1722 | } | 1722 | } |
| 1723 | 1723 | ||
| 1724 | /* Get rid of this buffer's alist element, if any. */ | 1724 | /* Get rid of this buffer's alist element, if any. */ |
| @@ -1800,7 +1800,7 @@ frame-local bindings). */) | |||
| 1800 | error ("Symbol %s may not be frame-local", | 1800 | error ("Symbol %s may not be frame-local", |
| 1801 | SDATA (SYMBOL_NAME (variable))); | 1801 | SDATA (SYMBOL_NAME (variable))); |
| 1802 | break; | 1802 | break; |
| 1803 | default: abort (); | 1803 | default: emacs_abort (); |
| 1804 | } | 1804 | } |
| 1805 | 1805 | ||
| 1806 | if (sym->constant) | 1806 | if (sym->constant) |
| @@ -1877,7 +1877,7 @@ BUFFER defaults to the current buffer. */) | |||
| 1877 | } | 1877 | } |
| 1878 | return Qnil; | 1878 | return Qnil; |
| 1879 | } | 1879 | } |
| 1880 | default: abort (); | 1880 | default: emacs_abort (); |
| 1881 | } | 1881 | } |
| 1882 | } | 1882 | } |
| 1883 | 1883 | ||
| @@ -1912,7 +1912,7 @@ BUFFER defaults to the current buffer. */) | |||
| 1912 | case SYMBOL_FORWARDED: | 1912 | case SYMBOL_FORWARDED: |
| 1913 | /* All BUFFER_OBJFWD slots become local if they are set. */ | 1913 | /* All BUFFER_OBJFWD slots become local if they are set. */ |
| 1914 | return (BUFFER_OBJFWDP (SYMBOL_FWD (sym)) ? Qt : Qnil); | 1914 | return (BUFFER_OBJFWDP (SYMBOL_FWD (sym)) ? Qt : Qnil); |
| 1915 | default: abort (); | 1915 | default: emacs_abort (); |
| 1916 | } | 1916 | } |
| 1917 | } | 1917 | } |
| 1918 | 1918 | ||
| @@ -1956,7 +1956,7 @@ If the current binding is global (the default), the value is nil. */) | |||
| 1956 | return SYMBOL_BLV (sym)->where; | 1956 | return SYMBOL_BLV (sym)->where; |
| 1957 | else | 1957 | else |
| 1958 | return Qnil; | 1958 | return Qnil; |
| 1959 | default: abort (); | 1959 | default: emacs_abort (); |
| 1960 | } | 1960 | } |
| 1961 | } | 1961 | } |
| 1962 | 1962 | ||
| @@ -2272,7 +2272,7 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | |||
| 2272 | return Qnil; | 2272 | return Qnil; |
| 2273 | 2273 | ||
| 2274 | default: | 2274 | default: |
| 2275 | abort (); | 2275 | emacs_abort (); |
| 2276 | } | 2276 | } |
| 2277 | } | 2277 | } |
| 2278 | 2278 | ||