diff options
| author | Eli Zaretskii | 2012-07-27 12:24:34 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-07-27 12:24:34 +0300 |
| commit | 3438fe218c77633ee2c5f106e3a335f906347247 (patch) | |
| tree | 4b7cfbb14dbf83c94541eb4b69b673bc6ec73099 /src | |
| parent | 0000d0d54bb9cbc835172d9f5f8ff7595786af62 (diff) | |
| download | emacs-3438fe218c77633ee2c5f106e3a335f906347247.tar.gz emacs-3438fe218c77633ee2c5f106e3a335f906347247.zip | |
Fix failure to compile on Windows due to 2012-07-27T06:04:35Z!dmantipov@yandex.ru.
src/lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
enumeration constants, as PURE and HEAP are too general, and clash
with other headers and sources, such as gmalloc.c and the
MS-Windows system headers. All users changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/alloc.c | 10 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/callint.c | 2 | ||||
| -rw-r--r-- | src/charset.c | 2 | ||||
| -rw-r--r-- | src/coding.c | 2 | ||||
| -rw-r--r-- | src/keymap.c | 4 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/search.c | 4 | ||||
| -rw-r--r-- | src/syntax.c | 2 | ||||
| -rw-r--r-- | src/w32.c | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 4 | ||||
| -rw-r--r-- | src/xfns.c | 2 |
14 files changed, 29 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 93697303cbb..54b34eb5c00 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-07-27 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for | ||
| 4 | enumeration constants, as PURE and HEAP are too general, and clash | ||
| 5 | with other headers and sources, such as gmalloc.c and the | ||
| 6 | MS-Windows system headers. All users changed. | ||
| 7 | |||
| 1 | 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru> | 8 | 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 9 | ||
| 3 | Revert last save_excursion_save and save_excursion_restore changes. | 10 | Revert last save_excursion_save and save_excursion_restore changes. |
diff --git a/src/alloc.c b/src/alloc.c index c7936921a09..27426cdff66 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2813,7 +2813,7 @@ list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, L | |||
| 2813 | 2813 | ||
| 2814 | /* Make a list of COUNT Lisp_Objects, where ARG is the | 2814 | /* Make a list of COUNT Lisp_Objects, where ARG is the |
| 2815 | first one. Allocate conses from pure space if TYPE | 2815 | first one. Allocate conses from pure space if TYPE |
| 2816 | is PURE, or allocate as usual if type is HEAP. */ | 2816 | is CONSTYPE_PURE, or allocate as usual if type is CONSTYPE_HEAP. */ |
| 2817 | 2817 | ||
| 2818 | Lisp_Object | 2818 | Lisp_Object |
| 2819 | listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...) | 2819 | listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...) |
| @@ -2834,9 +2834,9 @@ listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...) | |||
| 2834 | 2834 | ||
| 2835 | for (i = 0, val = Qnil; i < count; i++) | 2835 | for (i = 0, val = Qnil; i < count; i++) |
| 2836 | { | 2836 | { |
| 2837 | if (type == PURE) | 2837 | if (type == CONSTYPE_PURE) |
| 2838 | val = pure_cons (objp[i], val); | 2838 | val = pure_cons (objp[i], val); |
| 2839 | else if (type == HEAP) | 2839 | else if (type == CONSTYPE_HEAP) |
| 2840 | val = Fcons (objp[i], val); | 2840 | val = Fcons (objp[i], val); |
| 2841 | else | 2841 | else |
| 2842 | abort (); | 2842 | abort (); |
| @@ -6676,7 +6676,7 @@ Frames, windows, buffers, and subprocesses count as vectors | |||
| 6676 | (but the contents of a buffer's text do not count here). */) | 6676 | (but the contents of a buffer's text do not count here). */) |
| 6677 | (void) | 6677 | (void) |
| 6678 | { | 6678 | { |
| 6679 | return listn (HEAP, 8, | 6679 | return listn (CONSTYPE_HEAP, 8, |
| 6680 | bounded_number (cons_cells_consed), | 6680 | bounded_number (cons_cells_consed), |
| 6681 | bounded_number (floats_consed), | 6681 | bounded_number (floats_consed), |
| 6682 | bounded_number (vector_cells_consed), | 6682 | bounded_number (vector_cells_consed), |
| @@ -6865,7 +6865,7 @@ do hash-consing of the objects allocated to pure space. */); | |||
| 6865 | /* We build this in advance because if we wait until we need it, we might | 6865 | /* We build this in advance because if we wait until we need it, we might |
| 6866 | not be able to allocate the memory to hold it. */ | 6866 | not be able to allocate the memory to hold it. */ |
| 6867 | Vmemory_signal_data | 6867 | Vmemory_signal_data |
| 6868 | = listn (PURE, 2, Qerror, | 6868 | = listn (CONSTYPE_PURE, 2, Qerror, |
| 6869 | build_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs")); | 6869 | build_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs")); |
| 6870 | 6870 | ||
| 6871 | DEFVAR_LISP ("memory-full", Vmemory_full, | 6871 | DEFVAR_LISP ("memory-full", Vmemory_full, |
diff --git a/src/buffer.c b/src/buffer.c index c2afd7f4a5e..5e45882b892 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5212,7 +5212,7 @@ syms_of_buffer (void) | |||
| 5212 | DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions"); | 5212 | DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions"); |
| 5213 | 5213 | ||
| 5214 | Fput (Qprotected_field, Qerror_conditions, | 5214 | Fput (Qprotected_field, Qerror_conditions, |
| 5215 | listn (PURE, 2, Qprotected_field, Qerror)); | 5215 | listn (CONSTYPE_PURE, 2, Qprotected_field, Qerror)); |
| 5216 | Fput (Qprotected_field, Qerror_message, | 5216 | Fput (Qprotected_field, Qerror_message, |
| 5217 | build_pure_c_string ("Attempt to modify a protected field")); | 5217 | build_pure_c_string ("Attempt to modify a protected field")); |
| 5218 | 5218 | ||
diff --git a/src/callint.c b/src/callint.c index 4454b1fdb16..4b53b5df34b 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -888,7 +888,7 @@ syms_of_callint (void) | |||
| 888 | callint_message = Qnil; | 888 | callint_message = Qnil; |
| 889 | staticpro (&callint_message); | 889 | staticpro (&callint_message); |
| 890 | 890 | ||
| 891 | preserved_fns = listn (PURE, 4, | 891 | preserved_fns = listn (CONSTYPE_PURE, 4, |
| 892 | intern_c_string ("region-beginning"), | 892 | intern_c_string ("region-beginning"), |
| 893 | intern_c_string ("region-end"), | 893 | intern_c_string ("region-end"), |
| 894 | intern_c_string ("point"), | 894 | intern_c_string ("point"), |
diff --git a/src/charset.c b/src/charset.c index ae822544006..b621109b75d 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1283,7 +1283,7 @@ define_charset_internal (Lisp_Object name, | |||
| 1283 | args[charset_arg_unify_map] = Qnil; | 1283 | args[charset_arg_unify_map] = Qnil; |
| 1284 | 1284 | ||
| 1285 | args[charset_arg_plist] = | 1285 | args[charset_arg_plist] = |
| 1286 | listn (HEAP, 14, | 1286 | listn (CONSTYPE_HEAP, 14, |
| 1287 | intern_c_string (":name"), | 1287 | intern_c_string (":name"), |
| 1288 | args[charset_arg_name], | 1288 | args[charset_arg_name], |
| 1289 | intern_c_string (":dimension"), | 1289 | intern_c_string (":dimension"), |
diff --git a/src/coding.c b/src/coding.c index 8b858aa218e..7b178b0ce14 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -10411,7 +10411,7 @@ syms_of_coding (void) | |||
| 10411 | 10411 | ||
| 10412 | DEFSYM (Qcoding_system_error, "coding-system-error"); | 10412 | DEFSYM (Qcoding_system_error, "coding-system-error"); |
| 10413 | Fput (Qcoding_system_error, Qerror_conditions, | 10413 | Fput (Qcoding_system_error, Qerror_conditions, |
| 10414 | listn (PURE, 2, Qcoding_system_error, Qerror)); | 10414 | listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror)); |
| 10415 | Fput (Qcoding_system_error, Qerror_message, | 10415 | Fput (Qcoding_system_error, Qerror_message, |
| 10416 | build_pure_c_string ("Invalid coding system")); | 10416 | build_pure_c_string ("Invalid coding system")); |
| 10417 | 10417 | ||
diff --git a/src/keymap.c b/src/keymap.c index d86a4cd74de..6cc76700542 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3702,7 +3702,7 @@ syms_of_keymap (void) | |||
| 3702 | Fset (intern_c_string ("ctl-x-map"), control_x_map); | 3702 | Fset (intern_c_string ("ctl-x-map"), control_x_map); |
| 3703 | Ffset (intern_c_string ("Control-X-prefix"), control_x_map); | 3703 | Ffset (intern_c_string ("Control-X-prefix"), control_x_map); |
| 3704 | 3704 | ||
| 3705 | exclude_keys = listn (PURE, 5, | 3705 | exclude_keys = listn (CONSTYPE_PURE, 5, |
| 3706 | pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")), | 3706 | pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")), |
| 3707 | pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")), | 3707 | pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")), |
| 3708 | pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")), | 3708 | pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")), |
| @@ -3760,7 +3760,7 @@ be preferred. */); | |||
| 3760 | where_is_preferred_modifier = 0; | 3760 | where_is_preferred_modifier = 0; |
| 3761 | 3761 | ||
| 3762 | staticpro (&Vmouse_events); | 3762 | staticpro (&Vmouse_events); |
| 3763 | Vmouse_events = listn (PURE, 9, | 3763 | Vmouse_events = listn (CONSTYPE_PURE, 9, |
| 3764 | intern_c_string ("menu-bar"), | 3764 | intern_c_string ("menu-bar"), |
| 3765 | intern_c_string ("tool-bar"), | 3765 | intern_c_string ("tool-bar"), |
| 3766 | intern_c_string ("header-line"), | 3766 | intern_c_string ("header-line"), |
diff --git a/src/lisp.h b/src/lisp.h index f0129f05efd..80a9ab343c3 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2643,7 +2643,7 @@ extern Lisp_Object list3 (Lisp_Object, Lisp_Object, Lisp_Object); | |||
| 2643 | extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); | 2643 | extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 2644 | extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, | 2644 | extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, |
| 2645 | Lisp_Object); | 2645 | Lisp_Object); |
| 2646 | enum constype {HEAP, PURE}; | 2646 | enum constype {CONSTYPE_HEAP, CONSTYPE_PURE}; |
| 2647 | extern Lisp_Object listn (enum constype, ptrdiff_t, Lisp_Object, ...); | 2647 | extern Lisp_Object listn (enum constype, ptrdiff_t, Lisp_Object, ...); |
| 2648 | extern _Noreturn void string_overflow (void); | 2648 | extern _Noreturn void string_overflow (void); |
| 2649 | extern Lisp_Object make_string (const char *, ptrdiff_t); | 2649 | extern Lisp_Object make_string (const char *, ptrdiff_t); |
diff --git a/src/search.c b/src/search.c index c4329dcdf3e..480d0b75c70 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -3054,12 +3054,12 @@ syms_of_search (void) | |||
| 3054 | DEFSYM (Qinvalid_regexp, "invalid-regexp"); | 3054 | DEFSYM (Qinvalid_regexp, "invalid-regexp"); |
| 3055 | 3055 | ||
| 3056 | Fput (Qsearch_failed, Qerror_conditions, | 3056 | Fput (Qsearch_failed, Qerror_conditions, |
| 3057 | listn (PURE, 2, Qsearch_failed, Qerror)); | 3057 | listn (CONSTYPE_PURE, 2, Qsearch_failed, Qerror)); |
| 3058 | Fput (Qsearch_failed, Qerror_message, | 3058 | Fput (Qsearch_failed, Qerror_message, |
| 3059 | build_pure_c_string ("Search failed")); | 3059 | build_pure_c_string ("Search failed")); |
| 3060 | 3060 | ||
| 3061 | Fput (Qinvalid_regexp, Qerror_conditions, | 3061 | Fput (Qinvalid_regexp, Qerror_conditions, |
| 3062 | listn (PURE, 2, Qinvalid_regexp, Qerror)); | 3062 | listn (CONSTYPE_PURE, 2, Qinvalid_regexp, Qerror)); |
| 3063 | Fput (Qinvalid_regexp, Qerror_message, | 3063 | Fput (Qinvalid_regexp, Qerror_message, |
| 3064 | build_pure_c_string ("Invalid regexp")); | 3064 | build_pure_c_string ("Invalid regexp")); |
| 3065 | 3065 | ||
diff --git a/src/syntax.c b/src/syntax.c index 1e57c00e512..14bec9a9c2f 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3473,7 +3473,7 @@ syms_of_syntax (void) | |||
| 3473 | 3473 | ||
| 3474 | DEFSYM (Qscan_error, "scan-error"); | 3474 | DEFSYM (Qscan_error, "scan-error"); |
| 3475 | Fput (Qscan_error, Qerror_conditions, | 3475 | Fput (Qscan_error, Qerror_conditions, |
| 3476 | listn (PURE, 2, Qscan_error, Qerror)); | 3476 | listn (CONSTYPE_PURE, 2, Qscan_error, Qerror)); |
| 3477 | Fput (Qscan_error, Qerror_message, | 3477 | Fput (Qscan_error, Qerror_message, |
| 3478 | build_pure_c_string ("Scan error")); | 3478 | build_pure_c_string ("Scan error")); |
| 3479 | 3479 | ||
| @@ -1722,8 +1722,8 @@ init_environment (char ** argv) | |||
| 1722 | dwType = REG_EXPAND_SZ; | 1722 | dwType = REG_EXPAND_SZ; |
| 1723 | dont_free = 1; | 1723 | dont_free = 1; |
| 1724 | if (!strcmp (env_vars[i].name, "HOME") && !appdata) | 1724 | if (!strcmp (env_vars[i].name, "HOME") && !appdata) |
| 1725 | Vdelayed_warnings_list | 1725 | Vdelayed_warnings_list |
| 1726 | = Fcons (listn (HEAP, 2, | 1726 | = Fcons (listn (CONSTYPE_HEAP, 2, |
| 1727 | intern ("initialization"), | 1727 | intern ("initialization"), |
| 1728 | build_string ("Setting HOME to C:\\ by default is deprecated")), | 1728 | build_string ("Setting HOME to C:\\ by default is deprecated")), |
| 1729 | Vdelayed_warnings_list); | 1729 | Vdelayed_warnings_list); |
diff --git a/src/w32fns.c b/src/w32fns.c index 265af7378c4..1b1c5001344 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -6544,7 +6544,7 @@ The following %-sequences are provided: | |||
| 6544 | remain = build_string (buffer); | 6544 | remain = build_string (buffer); |
| 6545 | } | 6545 | } |
| 6546 | 6546 | ||
| 6547 | status = listn (HEAP, 8, | 6547 | status = listn (CONSTYPE_HEAP, 8, |
| 6548 | Fcons (make_number ('L'), line_status), | 6548 | Fcons (make_number ('L'), line_status), |
| 6549 | Fcons (make_number ('B'), battery_status), | 6549 | Fcons (make_number ('B'), battery_status), |
| 6550 | Fcons (make_number ('b'), battery_status_symbol), | 6550 | Fcons (make_number ('b'), battery_status_symbol), |
| @@ -6794,7 +6794,7 @@ syms_of_w32fns (void) | |||
| 6794 | 6794 | ||
| 6795 | 6795 | ||
| 6796 | Fput (Qundefined_color, Qerror_conditions, | 6796 | Fput (Qundefined_color, Qerror_conditions, |
| 6797 | listn (PURE, 2, Qundefined_color, Qerror)); | 6797 | listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror)); |
| 6798 | Fput (Qundefined_color, Qerror_message, | 6798 | Fput (Qundefined_color, Qerror_message, |
| 6799 | build_pure_c_string ("Undefined color")); | 6799 | build_pure_c_string ("Undefined color")); |
| 6800 | 6800 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index aac34d35ef4..ecb9f0d50c9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -28932,10 +28932,10 @@ and is used only on frames for which no explicit name has been set | |||
| 28932 | \(see `modify-frame-parameters'). */); | 28932 | \(see `modify-frame-parameters'). */); |
| 28933 | Vicon_title_format | 28933 | Vicon_title_format |
| 28934 | = Vframe_title_format | 28934 | = Vframe_title_format |
| 28935 | = listn (PURE, 3, | 28935 | = listn (CONSTYPE_PURE, 3, |
| 28936 | intern_c_string ("multiple-frames"), | 28936 | intern_c_string ("multiple-frames"), |
| 28937 | build_pure_c_string ("%b"), | 28937 | build_pure_c_string ("%b"), |
| 28938 | listn (PURE, 4, | 28938 | listn (CONSTYPE_PURE, 4, |
| 28939 | empty_unibyte_string, | 28939 | empty_unibyte_string, |
| 28940 | intern_c_string ("invocation-name"), | 28940 | intern_c_string ("invocation-name"), |
| 28941 | build_pure_c_string ("@"), | 28941 | build_pure_c_string ("@"), |
diff --git a/src/xfns.c b/src/xfns.c index cd29dabc71a..c8c96b642f0 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5822,7 +5822,7 @@ syms_of_xfns (void) | |||
| 5822 | /* This is the end of symbol initialization. */ | 5822 | /* This is the end of symbol initialization. */ |
| 5823 | 5823 | ||
| 5824 | Fput (Qundefined_color, Qerror_conditions, | 5824 | Fput (Qundefined_color, Qerror_conditions, |
| 5825 | listn (PURE, 2, Qundefined_color, Qerror)); | 5825 | listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror)); |
| 5826 | Fput (Qundefined_color, Qerror_message, | 5826 | Fput (Qundefined_color, Qerror_message, |
| 5827 | build_pure_c_string ("Undefined color")); | 5827 | build_pure_c_string ("Undefined color")); |
| 5828 | 5828 | ||