diff options
| author | Paul Eggert | 2019-02-01 13:03:18 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-02-01 13:05:39 -0800 |
| commit | 3b69e02a248c8b46223d5a9cecfb2494992e5fbe (patch) | |
| tree | 22eca8d283fb1ea9aef90f5529260803e95dc266 /src | |
| parent | 84802b66197c623735aaca875b8e1a39cb0ef085 (diff) | |
| download | emacs-3b69e02a248c8b46223d5a9cecfb2494992e5fbe.tar.gz emacs-3b69e02a248c8b46223d5a9cecfb2494992e5fbe.zip | |
Rename CANNOT_DUMP to HAVE_UNEXEC
* configure.ac (CANNOT_DUMP): Remove. All uses removed,
or changed to the negative of with_unexec.
(HAVE_UNEXEC): New macro. All uses of CANNOT_DUMP changed
to the negative of this macro.
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 12 | ||||
| -rw-r--r-- | src/conf_post.h | 10 | ||||
| -rw-r--r-- | src/emacs.c | 44 | ||||
| -rw-r--r-- | src/image.c | 2 | ||||
| -rw-r--r-- | src/lastfile.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 32 | ||||
| -rw-r--r-- | src/term.c | 3 | ||||
| -rw-r--r-- | src/timefns.c | 4 | ||||
| -rw-r--r-- | src/unexcoff.c | 4 | ||||
| -rw-r--r-- | src/w32heap.c | 8 |
10 files changed, 59 insertions, 62 deletions
diff --git a/src/alloc.c b/src/alloc.c index 5ea466becae..a0d0a611346 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -168,7 +168,7 @@ voidfuncptr __MALLOC_HOOK_VOLATILE __malloc_initialize_hook EXTERNALLY_VISIBLE | |||
| 168 | 168 | ||
| 169 | #endif | 169 | #endif |
| 170 | 170 | ||
| 171 | #if defined DOUG_LEA_MALLOC || !defined CANNOT_DUMP | 171 | #if defined DOUG_LEA_MALLOC || defined HAVE_UNEXEC |
| 172 | 172 | ||
| 173 | /* Allocator-related actions to do just before and after unexec. */ | 173 | /* Allocator-related actions to do just before and after unexec. */ |
| 174 | 174 | ||
| @@ -502,11 +502,11 @@ static struct mem_node *mem_find (void *); | |||
| 502 | #endif | 502 | #endif |
| 503 | 503 | ||
| 504 | /* Addresses of staticpro'd variables. Initialize it to a nonzero | 504 | /* Addresses of staticpro'd variables. Initialize it to a nonzero |
| 505 | value if we might dump; otherwise some compilers put it into | 505 | value if we might unexec; otherwise some compilers put it into |
| 506 | BSS. */ | 506 | BSS. */ |
| 507 | 507 | ||
| 508 | Lisp_Object *staticvec[NSTATICS] | 508 | Lisp_Object *staticvec[NSTATICS] |
| 509 | #ifndef CANNOT_DUMP | 509 | #ifdef HAVE_UNEXEC |
| 510 | = {&Vpurify_flag} | 510 | = {&Vpurify_flag} |
| 511 | #endif | 511 | #endif |
| 512 | ; | 512 | ; |
| @@ -1192,9 +1192,9 @@ verify (POWER_OF_2 (BLOCK_ALIGN)); | |||
| 1192 | 1192 | ||
| 1193 | /* Use aligned_alloc if it or a simple substitute is available. | 1193 | /* Use aligned_alloc if it or a simple substitute is available. |
| 1194 | Aligned allocation is incompatible with unexmacosx.c, so don't use | 1194 | Aligned allocation is incompatible with unexmacosx.c, so don't use |
| 1195 | it on Darwin unless CANNOT_DUMP. */ | 1195 | it on Darwin if HAVE_UNEXEC. */ |
| 1196 | 1196 | ||
| 1197 | #if !defined DARWIN_OS || defined CANNOT_DUMP | 1197 | #if ! (defined DARWIN_OS && defined HAVE_UNEXEC) |
| 1198 | # if (defined HAVE_ALIGNED_ALLOC \ | 1198 | # if (defined HAVE_ALIGNED_ALLOC \ |
| 1199 | || (defined HYBRID_MALLOC \ | 1199 | || (defined HYBRID_MALLOC \ |
| 1200 | ? defined HAVE_POSIX_MEMALIGN \ | 1200 | ? defined HAVE_POSIX_MEMALIGN \ |
| @@ -5390,7 +5390,7 @@ pure_alloc (size_t size, int type) | |||
| 5390 | } | 5390 | } |
| 5391 | 5391 | ||
| 5392 | 5392 | ||
| 5393 | #ifndef CANNOT_DUMP | 5393 | #ifdef HAVE_UNEXEC |
| 5394 | 5394 | ||
| 5395 | /* Print a warning if PURESIZE is too small. */ | 5395 | /* Print a warning if PURESIZE is too small. */ |
| 5396 | 5396 | ||
diff --git a/src/conf_post.h b/src/conf_post.h index 125dbf01528..f8254cfa9df 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -92,13 +92,11 @@ typedef bool bool_bf; | |||
| 92 | # define ADDRESS_SANITIZER false | 92 | # define ADDRESS_SANITIZER false |
| 93 | #endif | 93 | #endif |
| 94 | 94 | ||
| 95 | #ifdef DARWIN_OS | 95 | #if defined DARWIN_OS && defined emacs && defined HAVE_UNEXEC |
| 96 | #if defined emacs && !defined CANNOT_DUMP | 96 | # define malloc unexec_malloc |
| 97 | #define malloc unexec_malloc | 97 | # define realloc unexec_realloc |
| 98 | #define realloc unexec_realloc | 98 | # define free unexec_free |
| 99 | #define free unexec_free | ||
| 100 | #endif | 99 | #endif |
| 101 | #endif /* DARWIN_OS */ | ||
| 102 | 100 | ||
| 103 | /* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use | 101 | /* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use |
| 104 | gmalloc before dumping and the system malloc after dumping. | 102 | gmalloc before dumping and the system malloc after dumping. |
diff --git a/src/emacs.c b/src/emacs.c index d6b8a87c723..ff814a149b3 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -149,7 +149,7 @@ bool running_asynch_code; | |||
| 149 | bool display_arg; | 149 | bool display_arg; |
| 150 | #endif | 150 | #endif |
| 151 | 151 | ||
| 152 | #if defined GNU_LINUX && !defined CANNOT_DUMP | 152 | #if defined GNU_LINUX && defined HAVE_UNEXEC |
| 153 | /* The gap between BSS end and heap start as far as we can tell. */ | 153 | /* The gap between BSS end and heap start as far as we can tell. */ |
| 154 | static uprintmax_t heap_bss_diff; | 154 | static uprintmax_t heap_bss_diff; |
| 155 | #endif | 155 | #endif |
| @@ -868,7 +868,7 @@ main (int argc, char **argv) | |||
| 868 | can set heap flags properly if we're going to unexec. */ | 868 | can set heap flags properly if we're going to unexec. */ |
| 869 | if (!initialized && temacs) | 869 | if (!initialized && temacs) |
| 870 | { | 870 | { |
| 871 | #ifndef CANNOT_DUMP | 871 | #ifdef HAVE_UNEXEC |
| 872 | if (strcmp (temacs, "dump") == 0 || | 872 | if (strcmp (temacs, "dump") == 0 || |
| 873 | strcmp (temacs, "bootstrap") == 0) | 873 | strcmp (temacs, "bootstrap") == 0) |
| 874 | gflags.will_dump_with_unexec_ = true; | 874 | gflags.will_dump_with_unexec_ = true; |
| @@ -878,7 +878,7 @@ main (int argc, char **argv) | |||
| 878 | strcmp (temacs, "pbootstrap") == 0) | 878 | strcmp (temacs, "pbootstrap") == 0) |
| 879 | gflags.will_dump_with_pdumper_ = true; | 879 | gflags.will_dump_with_pdumper_ = true; |
| 880 | #endif | 880 | #endif |
| 881 | #if defined (HAVE_PDUMPER) || !defined (CANNOT_DUMP) | 881 | #if defined HAVE_PDUMPER || defined HAVE_UNEXEC |
| 882 | if (strcmp (temacs, "bootstrap") == 0 || | 882 | if (strcmp (temacs, "bootstrap") == 0 || |
| 883 | strcmp (temacs, "pbootstrap") == 0) | 883 | strcmp (temacs, "pbootstrap") == 0) |
| 884 | gflags.will_bootstrap_ = true; | 884 | gflags.will_bootstrap_ = true; |
| @@ -904,7 +904,7 @@ main (int argc, char **argv) | |||
| 904 | #endif | 904 | #endif |
| 905 | } | 905 | } |
| 906 | 906 | ||
| 907 | #ifndef CANNOT_DUMP | 907 | #ifdef HAVE_UNEXEC |
| 908 | if (!will_dump_with_unexec_p ()) | 908 | if (!will_dump_with_unexec_p ()) |
| 909 | gflags.will_not_unexec_ = true; | 909 | gflags.will_not_unexec_ = true; |
| 910 | #endif | 910 | #endif |
| @@ -953,7 +953,7 @@ main (int argc, char **argv) | |||
| 953 | argc = maybe_disable_address_randomization ( | 953 | argc = maybe_disable_address_randomization ( |
| 954 | will_dump_with_unexec_p (), argc, argv); | 954 | will_dump_with_unexec_p (), argc, argv); |
| 955 | 955 | ||
| 956 | #if defined (GNU_LINUX) && !defined (CANNOT_DUMP) | 956 | #if defined GNU_LINUX && defined HAVE_UNEXEC |
| 957 | if (!initialized) | 957 | if (!initialized) |
| 958 | { | 958 | { |
| 959 | char *heap_start = my_heap_start (); | 959 | char *heap_start = my_heap_start (); |
| @@ -967,7 +967,7 @@ main (int argc, char **argv) | |||
| 967 | #endif | 967 | #endif |
| 968 | 968 | ||
| 969 | /* If using unexmacosx.c (set by s/darwin.h), we must do this. */ | 969 | /* If using unexmacosx.c (set by s/darwin.h), we must do this. */ |
| 970 | #if defined DARWIN_OS && !defined CANNOT_DUMP | 970 | #if defined DARWIN_OS && defined HAVE_UNEXEC |
| 971 | if (!initialized) | 971 | if (!initialized) |
| 972 | unexec_init_emacs_zone (); | 972 | unexec_init_emacs_zone (); |
| 973 | #endif | 973 | #endif |
| @@ -1445,7 +1445,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1445 | /* Call syms_of_keyboard before init_window_once because | 1445 | /* Call syms_of_keyboard before init_window_once because |
| 1446 | keyboard sets up symbols that include some face names that | 1446 | keyboard sets up symbols that include some face names that |
| 1447 | the X support will want to use. This can happen when | 1447 | the X support will want to use. This can happen when |
| 1448 | CANNOT_DUMP is defined. */ | 1448 | Emacs starts up from scratch (e.g., temacs). */ |
| 1449 | syms_of_keyboard (); | 1449 | syms_of_keyboard (); |
| 1450 | 1450 | ||
| 1451 | /* Called before syms_of_fileio, because it sets up Qerror_condition. */ | 1451 | /* Called before syms_of_fileio, because it sets up Qerror_condition. */ |
| @@ -2378,7 +2378,7 @@ shut_down_emacs (int sig, Lisp_Object stuff) | |||
| 2378 | 2378 | ||
| 2379 | 2379 | ||
| 2380 | 2380 | ||
| 2381 | #ifndef CANNOT_DUMP | 2381 | #ifdef HAVE_UNEXEC |
| 2382 | 2382 | ||
| 2383 | #include "unexec.h" | 2383 | #include "unexec.h" |
| 2384 | 2384 | ||
| @@ -2405,10 +2405,10 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2405 | if (definitely_will_not_unexec_p ()) | 2405 | if (definitely_will_not_unexec_p ()) |
| 2406 | error ("This Emacs instance was not started in temacs mode"); | 2406 | error ("This Emacs instance was not started in temacs mode"); |
| 2407 | 2407 | ||
| 2408 | #if defined GNU_LINUX && !defined CANNOT_DUMP | 2408 | # if defined GNU_LINUX && defined HAVE_UNEXEC |
| 2409 | 2409 | ||
| 2410 | /* Warn if the gap between BSS end and heap start is larger than this. */ | 2410 | /* Warn if the gap between BSS end and heap start is larger than this. */ |
| 2411 | # define MAX_HEAP_BSS_DIFF (1024*1024) | 2411 | # define MAX_HEAP_BSS_DIFF (1024 * 1024) |
| 2412 | 2412 | ||
| 2413 | if (heap_bss_diff > MAX_HEAP_BSS_DIFF) | 2413 | if (heap_bss_diff > MAX_HEAP_BSS_DIFF) |
| 2414 | { | 2414 | { |
| @@ -2421,7 +2421,7 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2421 | fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n"); | 2421 | fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n"); |
| 2422 | fprintf (stderr, "**************************************************\n"); | 2422 | fprintf (stderr, "**************************************************\n"); |
| 2423 | } | 2423 | } |
| 2424 | #endif /* GNU_LINUX */ | 2424 | # endif |
| 2425 | 2425 | ||
| 2426 | /* Bind `command-line-processed' to nil before dumping, | 2426 | /* Bind `command-line-processed' to nil before dumping, |
| 2427 | so that the dumped Emacs will process its command line | 2427 | so that the dumped Emacs will process its command line |
| @@ -2445,7 +2445,7 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2445 | tem = Vpurify_flag; | 2445 | tem = Vpurify_flag; |
| 2446 | Vpurify_flag = Qnil; | 2446 | Vpurify_flag = Qnil; |
| 2447 | 2447 | ||
| 2448 | #ifdef HYBRID_MALLOC | 2448 | # ifdef HYBRID_MALLOC |
| 2449 | { | 2449 | { |
| 2450 | static char const fmt[] = "%d of %d static heap bytes used"; | 2450 | static char const fmt[] = "%d of %d static heap bytes used"; |
| 2451 | char buf[sizeof fmt + 2 * (INT_STRLEN_BOUND (int) - 2)]; | 2451 | char buf[sizeof fmt + 2 * (INT_STRLEN_BOUND (int) - 2)]; |
| @@ -2454,18 +2454,16 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2454 | /* Don't log messages, because at this point buffers cannot be created. */ | 2454 | /* Don't log messages, because at this point buffers cannot be created. */ |
| 2455 | message1_nolog (buf); | 2455 | message1_nolog (buf); |
| 2456 | } | 2456 | } |
| 2457 | #endif | 2457 | # endif |
| 2458 | 2458 | ||
| 2459 | fflush_unlocked (stdout); | 2459 | fflush_unlocked (stdout); |
| 2460 | /* Tell malloc where start of impure now is. */ | 2460 | /* Tell malloc where start of impure now is. */ |
| 2461 | /* Also arrange for warnings when nearly out of space. */ | 2461 | /* Also arrange for warnings when nearly out of space. */ |
| 2462 | #if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC | 2462 | # if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC && !defined WINDOWSNT |
| 2463 | #ifndef WINDOWSNT | ||
| 2464 | /* On Windows, this was done before dumping, and that once suffices. | 2463 | /* On Windows, this was done before dumping, and that once suffices. |
| 2465 | Meanwhile, my_edata is not valid on Windows. */ | 2464 | Meanwhile, my_edata is not valid on Windows. */ |
| 2466 | memory_warnings (my_edata, malloc_warning); | 2465 | memory_warnings (my_edata, malloc_warning); |
| 2467 | #endif /* not WINDOWSNT */ | 2466 | # endif |
| 2468 | #endif /* not SYSTEM_MALLOC and not HYBRID_MALLOC */ | ||
| 2469 | 2467 | ||
| 2470 | struct gflags old_gflags = gflags; | 2468 | struct gflags old_gflags = gflags; |
| 2471 | gflags.will_dump_ = false; | 2469 | gflags.will_dump_ = false; |
| @@ -2480,19 +2478,19 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2480 | 2478 | ||
| 2481 | gflags = old_gflags; | 2479 | gflags = old_gflags; |
| 2482 | 2480 | ||
| 2483 | #ifdef WINDOWSNT | 2481 | # ifdef WINDOWSNT |
| 2484 | Vlibrary_cache = Qnil; | 2482 | Vlibrary_cache = Qnil; |
| 2485 | #endif | 2483 | # endif |
| 2486 | #ifdef HAVE_WINDOW_SYSTEM | 2484 | # ifdef HAVE_WINDOW_SYSTEM |
| 2487 | reset_image_types (); | 2485 | reset_image_types (); |
| 2488 | #endif | 2486 | # endif |
| 2489 | 2487 | ||
| 2490 | Vpurify_flag = tem; | 2488 | Vpurify_flag = tem; |
| 2491 | 2489 | ||
| 2492 | return unbind_to (count, Qnil); | 2490 | return unbind_to (count, Qnil); |
| 2493 | } | 2491 | } |
| 2494 | 2492 | ||
| 2495 | #endif /* not CANNOT_DUMP */ | 2493 | #endif |
| 2496 | 2494 | ||
| 2497 | 2495 | ||
| 2498 | #if HAVE_SETLOCALE | 2496 | #if HAVE_SETLOCALE |
| @@ -2781,7 +2779,7 @@ syms_of_emacs (void) | |||
| 2781 | DEFSYM (Qkill_emacs, "kill-emacs"); | 2779 | DEFSYM (Qkill_emacs, "kill-emacs"); |
| 2782 | DEFSYM (Qkill_emacs_hook, "kill-emacs-hook"); | 2780 | DEFSYM (Qkill_emacs_hook, "kill-emacs-hook"); |
| 2783 | 2781 | ||
| 2784 | #ifndef CANNOT_DUMP | 2782 | #ifdef HAVE_UNEXEC |
| 2785 | defsubr (&Sdump_emacs); | 2783 | defsubr (&Sdump_emacs); |
| 2786 | #endif | 2784 | #endif |
| 2787 | 2785 | ||
diff --git a/src/image.c b/src/image.c index 20148605817..57bbf3cdb93 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -10003,7 +10003,7 @@ lookup_image_type (Lisp_Object type) | |||
| 10003 | return NULL; | 10003 | return NULL; |
| 10004 | } | 10004 | } |
| 10005 | 10005 | ||
| 10006 | #if !defined CANNOT_DUMP && defined HAVE_WINDOW_SYSTEM | 10006 | #if defined HAVE_UNEXEC && defined HAVE_WINDOW_SYSTEM |
| 10007 | 10007 | ||
| 10008 | /* Reset image_types before dumping. | 10008 | /* Reset image_types before dumping. |
| 10009 | Called from Fdump_emacs. */ | 10009 | Called from Fdump_emacs. */ |
diff --git a/src/lastfile.c b/src/lastfile.c index 706f667dbb9..bcaf105a51b 100644 --- a/src/lastfile.c +++ b/src/lastfile.c | |||
| @@ -43,7 +43,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 43 | char my_edata[] = "End of Emacs initialized data"; | 43 | char my_edata[] = "End of Emacs initialized data"; |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | #ifndef CANNOT_DUMP | 46 | #ifdef HAVE_UNEXEC |
| 47 | 47 | ||
| 48 | /* Help unexec locate the end of the .bss area used by Emacs (which | 48 | /* Help unexec locate the end of the .bss area used by Emacs (which |
| 49 | isn't always a separate section in NT executables). */ | 49 | isn't always a separate section in NT executables). */ |
diff --git a/src/lisp.h b/src/lisp.h index 5a0de4b12c7..3b481089cfd 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -633,11 +633,11 @@ extern bool initialized; | |||
| 633 | 633 | ||
| 634 | extern struct gflags { | 634 | extern struct gflags { |
| 635 | /* True means this Emacs instance was born to dump. */ | 635 | /* True means this Emacs instance was born to dump. */ |
| 636 | #if defined (HAVE_PDUMPER) || !defined (CANNOT_DUMP) | 636 | #if defined HAVE_PDUMPER || defined HAVE_UNEXEC |
| 637 | bool will_dump_ : 1; | 637 | bool will_dump_ : 1; |
| 638 | bool will_bootstrap_ : 1; | 638 | bool will_bootstrap_ : 1; |
| 639 | #endif | 639 | #endif |
| 640 | #if defined (HAVE_PDUMPER) | 640 | #ifdef HAVE_PDUMPER |
| 641 | /* Set in an Emacs process that will likely dump with pdumper; all | 641 | /* Set in an Emacs process that will likely dump with pdumper; all |
| 642 | Emacs processes may dump with pdumper, however. */ | 642 | Emacs processes may dump with pdumper, however. */ |
| 643 | bool will_dump_with_pdumper_ : 1; | 643 | bool will_dump_with_pdumper_ : 1; |
| @@ -645,7 +645,7 @@ extern struct gflags { | |||
| 645 | dump. */ | 645 | dump. */ |
| 646 | bool dumped_with_pdumper_ : 1; | 646 | bool dumped_with_pdumper_ : 1; |
| 647 | #endif | 647 | #endif |
| 648 | #ifndef CANNOT_DUMP | 648 | #ifdef HAVE_UNEXEC |
| 649 | bool will_dump_with_unexec_ : 1; | 649 | bool will_dump_with_unexec_ : 1; |
| 650 | /* Set in an Emacs process that has been restored from an unexec | 650 | /* Set in an Emacs process that has been restored from an unexec |
| 651 | dump. */ | 651 | dump. */ |
| @@ -658,7 +658,7 @@ extern struct gflags { | |||
| 658 | INLINE bool | 658 | INLINE bool |
| 659 | will_dump_p (void) | 659 | will_dump_p (void) |
| 660 | { | 660 | { |
| 661 | #if HAVE_PDUMPER || !defined (CANNOT_DUMP) | 661 | #if HAVE_PDUMPER || defined HAVE_UNEXEC |
| 662 | return gflags.will_dump_; | 662 | return gflags.will_dump_; |
| 663 | #else | 663 | #else |
| 664 | return false; | 664 | return false; |
| @@ -668,7 +668,7 @@ will_dump_p (void) | |||
| 668 | INLINE bool | 668 | INLINE bool |
| 669 | will_bootstrap_p (void) | 669 | will_bootstrap_p (void) |
| 670 | { | 670 | { |
| 671 | #if HAVE_PDUMPER || !defined (CANNOT_DUMP) | 671 | #if HAVE_PDUMPER || defined HAVE_UNEXEC |
| 672 | return gflags.will_bootstrap_; | 672 | return gflags.will_bootstrap_; |
| 673 | #else | 673 | #else |
| 674 | return false; | 674 | return false; |
| @@ -698,20 +698,20 @@ dumped_with_pdumper_p (void) | |||
| 698 | INLINE bool | 698 | INLINE bool |
| 699 | will_dump_with_unexec_p (void) | 699 | will_dump_with_unexec_p (void) |
| 700 | { | 700 | { |
| 701 | #ifdef CANNOT_DUMP | 701 | #ifdef HAVE_UNEXEC |
| 702 | return false; | ||
| 703 | #else | ||
| 704 | return gflags.will_dump_with_unexec_; | 702 | return gflags.will_dump_with_unexec_; |
| 703 | #else | ||
| 704 | return false; | ||
| 705 | #endif | 705 | #endif |
| 706 | } | 706 | } |
| 707 | 707 | ||
| 708 | INLINE bool | 708 | INLINE bool |
| 709 | dumped_with_unexec_p (void) | 709 | dumped_with_unexec_p (void) |
| 710 | { | 710 | { |
| 711 | #ifdef CANNOT_DUMP | 711 | #ifdef HAVE_UNEXEC |
| 712 | return false; | ||
| 713 | #else | ||
| 714 | return gflags.dumped_with_unexec_; | 712 | return gflags.dumped_with_unexec_; |
| 713 | #else | ||
| 714 | return false; | ||
| 715 | #endif | 715 | #endif |
| 716 | } | 716 | } |
| 717 | 717 | ||
| @@ -721,10 +721,10 @@ dumped_with_unexec_p (void) | |||
| 721 | INLINE bool | 721 | INLINE bool |
| 722 | definitely_will_not_unexec_p (void) | 722 | definitely_will_not_unexec_p (void) |
| 723 | { | 723 | { |
| 724 | #ifdef CANNOT_DUMP | 724 | #ifdef HAVE_UNEXEC |
| 725 | return true; | ||
| 726 | #else | ||
| 727 | return gflags.will_not_unexec_; | 725 | return gflags.will_not_unexec_; |
| 726 | #else | ||
| 727 | return true; | ||
| 728 | #endif | 728 | #endif |
| 729 | } | 729 | } |
| 730 | 730 | ||
| @@ -3032,7 +3032,7 @@ CHECK_INTEGER (Lisp_Object x) | |||
| 3032 | /* If we're not dumping using the legacy dumper and we might be using | 3032 | /* If we're not dumping using the legacy dumper and we might be using |
| 3033 | the portable dumper, try to bunch all the subr structures together | 3033 | the portable dumper, try to bunch all the subr structures together |
| 3034 | for more efficient dump loading. */ | 3034 | for more efficient dump loading. */ |
| 3035 | #ifdef CANNOT_DUMP | 3035 | #ifndef HAVE_UNEXEC |
| 3036 | # ifdef DARWIN_OS | 3036 | # ifdef DARWIN_OS |
| 3037 | # define SUBR_SECTION_ATTRIBUTE ATTRIBUTE_SECTION ("__DATA,subrs") | 3037 | # define SUBR_SECTION_ATTRIBUTE ATTRIBUTE_SECTION ("__DATA,subrs") |
| 3038 | # else | 3038 | # else |
| @@ -4135,7 +4135,7 @@ Lisp_Object backtrace_top_function (void); | |||
| 4135 | extern bool let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol); | 4135 | extern bool let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol); |
| 4136 | 4136 | ||
| 4137 | /* Defined in unexmacosx.c. */ | 4137 | /* Defined in unexmacosx.c. */ |
| 4138 | #if defined DARWIN_OS && !defined CANNOT_DUMP | 4138 | #if defined DARWIN_OS && defined HAVE_UNEXEC |
| 4139 | extern void unexec_init_emacs_zone (void); | 4139 | extern void unexec_init_emacs_zone (void); |
| 4140 | extern void *unexec_malloc (size_t); | 4140 | extern void *unexec_malloc (size_t); |
| 4141 | extern void *unexec_realloc (void *, size_t); | 4141 | extern void *unexec_realloc (void *, size_t); |
diff --git a/src/term.c b/src/term.c index c5a1fb99a15..7255f561e2a 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1350,7 +1350,8 @@ term_get_fkeys_1 (void) | |||
| 1350 | char **address = term_get_fkeys_address; | 1350 | char **address = term_get_fkeys_address; |
| 1351 | KBOARD *kboard = term_get_fkeys_kboard; | 1351 | KBOARD *kboard = term_get_fkeys_kboard; |
| 1352 | 1352 | ||
| 1353 | /* This can happen if CANNOT_DUMP or with strange options. */ | 1353 | /* This can happen if Emacs is starting up from scratch, or with |
| 1354 | strange options. */ | ||
| 1354 | if (!KEYMAPP (KVAR (kboard, Vinput_decode_map))) | 1355 | if (!KEYMAPP (KVAR (kboard, Vinput_decode_map))) |
| 1355 | kset_input_decode_map (kboard, Fmake_sparse_keymap (Qnil)); | 1356 | kset_input_decode_map (kboard, Fmake_sparse_keymap (Qnil)); |
| 1356 | 1357 | ||
diff --git a/src/timefns.c b/src/timefns.c index ce1f4d3f5a9..7e061228e2c 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -294,7 +294,7 @@ tzlookup (Lisp_Object zone, bool settz) | |||
| 294 | void | 294 | void |
| 295 | init_timefns (void) | 295 | init_timefns (void) |
| 296 | { | 296 | { |
| 297 | #ifndef CANNOT_DUMP | 297 | #ifdef HAVE_UNEXEC |
| 298 | /* A valid but unlikely setting for the TZ environment variable. | 298 | /* A valid but unlikely setting for the TZ environment variable. |
| 299 | It is OK (though a bit slower) if the user chooses this value. */ | 299 | It is OK (though a bit slower) if the user chooses this value. */ |
| 300 | static char dump_tz_string[] = "TZ=UtC0"; | 300 | static char dump_tz_string[] = "TZ=UtC0"; |
| @@ -311,7 +311,7 @@ init_timefns (void) | |||
| 311 | 311 | ||
| 312 | char *tz = getenv ("TZ"); | 312 | char *tz = getenv ("TZ"); |
| 313 | 313 | ||
| 314 | #if !defined CANNOT_DUMP | 314 | #ifdef HAVE_UNEXEC |
| 315 | /* If the execution TZ happens to be the same as the dump TZ, | 315 | /* If the execution TZ happens to be the same as the dump TZ, |
| 316 | change it to some other value and then change it back, | 316 | change it to some other value and then change it back, |
| 317 | to force the underlying implementation to reload the TZ info. | 317 | to force the underlying implementation to reload the TZ info. |
diff --git a/src/unexcoff.c b/src/unexcoff.c index 6e90c0628d2..220ce709df9 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c | |||
| @@ -56,7 +56,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 56 | 56 | ||
| 57 | #define PERROR(file) report_error (file, new) | 57 | #define PERROR(file) report_error (file, new) |
| 58 | 58 | ||
| 59 | #ifndef CANNOT_DUMP /* all rest of file! */ | 59 | #ifdef HAVE_UNEXEC /* all rest of file! */ |
| 60 | 60 | ||
| 61 | #ifdef HAVE_COFF_H | 61 | #ifdef HAVE_COFF_H |
| 62 | #include <coff.h> | 62 | #include <coff.h> |
| @@ -538,4 +538,4 @@ unexec (const char *new_name, const char *a_name) | |||
| 538 | emacs_close (a_out); | 538 | emacs_close (a_out); |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | #endif /* not CANNOT_DUMP */ | 541 | #endif /* HAVE_UNEXEC */ |
diff --git a/src/w32heap.c b/src/w32heap.c index 8a2c1b5877b..9a59a1f0758 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -115,9 +115,9 @@ typedef struct _RTL_HEAP_PARAMETERS { | |||
| 115 | than half of the size stated below. It would be nice to find a way | 115 | than half of the size stated below. It would be nice to find a way |
| 116 | to build only the first bootstrap-emacs.exe with the large size, | 116 | to build only the first bootstrap-emacs.exe with the large size, |
| 117 | and reset that to a lower value afterwards. */ | 117 | and reset that to a lower value afterwards. */ |
| 118 | #ifdef CANNOT_DUMP | 118 | #ifndef HAVE_UNEXEC |
| 119 | /* We don't use dumped_data[] when CANNOT_DUMP, so define to a small | 119 | /* We don't use dumped_data[], so define to a small size that won't |
| 120 | size that won't matter. */ | 120 | matter. */ |
| 121 | # define DUMPED_HEAP_SIZE 10 | 121 | # define DUMPED_HEAP_SIZE 10 |
| 122 | #else | 122 | #else |
| 123 | # if defined _WIN64 || defined WIDE_EMACS_INT | 123 | # if defined _WIN64 || defined WIDE_EMACS_INT |
| @@ -597,7 +597,7 @@ free_after_dump_9x (void *ptr) | |||
| 597 | } | 597 | } |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | #if !defined (CANNOT_DUMP) && defined (ENABLE_CHECKING) | 600 | #if defined HAVE_UNEXEC && defined ENABLE_CHECKING |
| 601 | void | 601 | void |
| 602 | report_temacs_memory_usage (void) | 602 | report_temacs_memory_usage (void) |
| 603 | { | 603 | { |