diff src/emacs.c @ 110729:99084f50aa8e

Remove unused arguments for unexec. The third one is never used, and the last two are always passed as zero. * src/emacs.c (unexec): Add declaration. (Fdump_emacs): Only pass the first two arguments to unexec. Simplify #ifdef. * src/unexw32.c (unexec): * src/unexsol.c (unexec): * src/unexhp9k800.c (unexec): * src/unexcw.c (unexec): Remove the last 3 arguments, unused. * src/unexelf.c (unexec): Remove the last 3 arguments, unused. (find_section): Use const. * src/unexmacosx.c (unexec): Remove the last 3 arguments, unused. (unexec_error): Declare it NO_RETURN. * src/unexcoff.c (make_hdr): Assume bss_start is always zero, remove it as an argument, remove data_start and entry_address arguments, unused. (unexec): Remove bss_start, data_start and entry_address arguments. * src/unexaix.c (make_hdr): Assume bss_start is always zero, remove it as an argument, remove data_start and entry_address arguments, unused. (unexec): Remove bss_start, data_start and entry_address arguments.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 03 Oct 2010 06:59:56 -0700
parents 54ddd26c5a6c
children 188673195616
line wrap: on
line diff
--- a/src/emacs.c	Sun Oct 03 14:52:04 2010 +0200
+++ b/src/emacs.c	Sun Oct 03 06:59:56 2010 -0700
@@ -2118,6 +2118,10 @@
 
 #ifndef CANNOT_DUMP
 
+/* FIXME: maybe this should go into header file, config.h seems the
+   only one appropriate. */
+extern int unexec (const char *, const char *);
+
 DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0,
        doc: /* Dump current state of Emacs into executable file FILENAME.
 Take symbols from SYMFILE (presumably the file you executed to run Emacs).
@@ -2185,13 +2189,13 @@
      Meanwhile, my_edata is not valid on Windows.  */
   memory_warnings (my_edata, malloc_warning);
 #endif /* not WINDOWSNT */
-#endif
-#if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
+#if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
   /* Pthread may call malloc before main, and then we will get an endless
      loop, because pthread_self (see alloc.c) calls malloc the first time
      it is called on some systems.  */
   reset_malloc_hooks ();
 #endif
+#endif /* not SYSTEM_MALLOC */
 #ifdef DOUG_LEA_MALLOC
   malloc_state_ptr = malloc_get_state ();
 #endif
@@ -2199,8 +2203,7 @@
 #ifdef USE_MMAP_FOR_BUFFERS
   mmap_set_vars (0);
 #endif
-  unexec (SDATA (filename),
-	  !NILP (symfile) ? SDATA (symfile) : 0, my_edata, 0, 0);
+  unexec (SDATA (filename), !NILP (symfile) ? SDATA (symfile) : 0);
 #ifdef USE_MMAP_FOR_BUFFERS
   mmap_set_vars (1);
 #endif