Skip to content

Commit d15719d

Browse files
author
Ken Raeburn
committed
Fix CANNOT_DUMP build on Darwin/macOS.
* src/conf_post.h (malloc, realloc, free) [DARWIN_OS && emacs && CANNOT_DUMP]: Don't define as unexec_malloc, etc. * src/emacs.c (main): Don't call unexec_init_emacs_zone.
1 parent 04a5ce0 commit d15719d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/conf_post.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef bool bool_bf;
9494
#endif
9595

9696
#ifdef DARWIN_OS
97-
#ifdef emacs
97+
#if defined emacs && !defined CANNOT_DUMP
9898
#define malloc unexec_malloc
9999
#define realloc unexec_realloc
100100
#define free unexec_free

src/emacs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static
137137
bool might_dump;
138138
#endif
139139

140-
#ifdef DARWIN_OS
140+
#if defined DARWIN_OS && !defined CANNOT_DUMP
141141
extern void unexec_init_emacs_zone (void);
142142
#endif
143143

@@ -742,7 +742,7 @@ main (int argc, char **argv)
742742
#endif
743743

744744
/* If using unexmacosx.c (set by s/darwin.h), we must do this. */
745-
#ifdef DARWIN_OS
745+
#if defined DARWIN_OS && !defined CANNOT_DUMP
746746
if (!initialized)
747747
unexec_init_emacs_zone ();
748748
#endif

0 commit comments

Comments
 (0)