UNEXEC_OBJ=unexsol.o
;;
esac
+test "$CANNOT_DUMP" = "yes" && UNEXEC_OBJ=
LD_SWITCH_SYSTEM=
case "$opsys" in
hybrid_malloc=
system_malloc=yes
+test "$CANNOT_DUMP" = yes ||
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
darwin | mingw32 | nacl | sol2-10) ;;
#endif
+#if defined DOUG_LEA_MALLOC || !defined CANNOT_DUMP
+
/* Allocator-related actions to do just before and after unexec. */
void
alloc_unexec_pre (void)
{
-#ifdef DOUG_LEA_MALLOC
+# ifdef DOUG_LEA_MALLOC
malloc_state_ptr = malloc_get_state ();
if (!malloc_state_ptr)
fatal ("malloc_get_state: %s", strerror (errno));
-#endif
-#ifdef HYBRID_MALLOC
+# endif
+# ifdef HYBRID_MALLOC
bss_sbrk_did_unexec = true;
-#endif
+# endif
}
void
alloc_unexec_post (void)
{
-#ifdef DOUG_LEA_MALLOC
+# ifdef DOUG_LEA_MALLOC
free (malloc_state_ptr);
-#endif
-#ifdef HYBRID_MALLOC
+# endif
+# ifdef HYBRID_MALLOC
bss_sbrk_did_unexec = false;
-#endif
+# endif
}
+#endif
/* Mark, unmark, query mark bit of a Lisp string. S must be a pointer
to a struct Lisp_String. */
}
+#ifndef CANNOT_DUMP
+
/* Print a warning if PURESIZE is too small. */
void
" bytes needed)"),
pure_bytes_used + pure_bytes_used_before_overflow);
}
+#endif
/* Find the byte sequence {DATA[0], ..., DATA[NBYTES-1], '\0'} from
on subsequent starts. */
bool initialized;
+#ifdef CANNOT_DUMP
+enum { might_dump = false };
+#else
/* Set to true if this instance of Emacs might dump. */
-#ifndef DOUG_LEA_MALLOC
+# ifndef DOUG_LEA_MALLOC
static
-#endif
+# endif
bool might_dump;
+#endif
#ifdef DARWIN_OS
extern void unexec_init_emacs_zone (void);
#ifndef WINDOWSNT
/* Pipe used to send exit notification to the background daemon parent at
startup. On Windows, we use a kernel event instead. */
-int daemon_pipe[2];
+static int daemon_pipe[2];
#else
HANDLE w32_daemon_event;
#endif
return NULL;
}
+#if !defined CANNOT_DUMP && defined HAVE_WINDOW_SYSTEM
+
/* Reset image_types before dumping.
Called from Fdump_emacs. */
image_types = next;
}
}
+#endif
void
syms_of_image (void)
char my_edata[] = "End of Emacs initialized data";
#endif
+#ifndef CANNOT_DUMP
+
/* Help unexec locate the end of the .bss area used by Emacs (which
isn't always a separate section in NT executables). */
char my_endbss[1];
of the bss area used by Emacs. */
static char _my_endbss[1];
char * my_endbss_static = _my_endbss;
+
+#endif
mostlyclean:
-@for f in ${LOGFILES}; do test ! -f $$f || mv $$f $$f~; done
+ rm -f *.tmp
clean:
-rm -f ${LOGFILES} ${LOGSAVEFILES}
make-test-deps.mk: $(ELFILES) make-test-deps.emacs-lisp
$(EMACS) --batch -l $(srcdir)/make-test-deps.emacs-lisp \
--eval "(make-test-deps \"$(srcdir)\")" \
- 2> $@
-# Makefile ends here.
+ 2> $@.tmp
+ # Hack to elide any CANNOT_DUMP=yes chatter.
+ sed '/\.log: /!d' $@.tmp >$@
+ rm -f $@.tmp