New file unexec.h, the (simple) interface for unexec.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Mar 2011 23:59:54 +0000 (16:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Mar 2011 23:59:54 +0000 (16:59 -0700)
* deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
(unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
Depend on unexec.h.
* emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
* unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
* unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.

src/ChangeLog
src/deps.mk
src/emacs.c
src/unexaix.c
src/unexcoff.c
src/unexcw.c
src/unexelf.c
src/unexhp9k800.c
src/unexmacosx.c
src/unexsol.c
src/unexw32.c

index 7bc0a8f..14d3e37 100644 (file)
@@ -1,5 +1,13 @@
 2011-03-16  Paul Eggert  <eggert@cs.ucla.edu>
 
+       New file unexec.h, the (simple) interface for unexec.
+       * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
+       (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
+       Depend on unexec.h.
+       * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
+       * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
+       * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
+
        * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
        shadowing.
        (back_comment, skip_chars): Mark vars as initialized.
index 80a5721..c868ff0 100644 (file)
@@ -93,7 +93,7 @@ editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
 emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
    termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \
    globals.h ../lib/unistd.h window.h dispextern.h keyboard.h keymap.h \
-   frame.h coding.h gnutls.h msdos.h
+   frame.h coding.h gnutls.h msdos.h unexec.h
 fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
    coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h \
    commands.h globals.h ../lib/unistd.h
@@ -200,15 +200,15 @@ terminfo.o: terminfo.c lisp.h globals.h $(config_h)
 tparam.o: tparam.c tparam.h lisp.h $(config_h)
 undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \
    lisp.h globals.h $(config_h)
-unexaix.o: unexaix.c lisp.h $(config_h)
+unexaix.o: unexaix.c lisp.h unexec.h $(config_h)
 unexalpha.o: unexalpha.c $(config_h)
-unexcw.o: unexcw.c lisp.h $(config_h)
-unexcoff.o: unexcoff.c lisp.h $(config_h)
-unexelf.o: unexelf.c ../lib/unistd.h $(config_h)
-unexhp9k800.o: unexhp9k800.c $(config_h)
-unexmacosx.o: unexmacosx.c $(config_h)
-unexsol.o: unexsol.c lisp.h $(config_h)
-unexw32.o: unexw32.c $(config_h)
+unexcw.o: unexcw.c lisp.h unexec.h $(config_h)
+unexcoff.o: unexcoff.c lisp.h unexec.h $(config_h)
+unexelf.o: unexelf.c unexec.h ../lib/unistd.h $(config_h)
+unexhp9k800.o: unexhp9k800.c unexec.h $(config_h)
+unexmacosx.o: unexmacosx.c unexec.h $(config_h)
+unexsol.o: unexsol.c lisp.h unexec.h $(config_h)
+unexw32.o: unexw32.c unexec.h $(config_h)
 w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
    msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h)
 widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
index c49e38f..d30d42f 100644 (file)
@@ -2085,9 +2085,7 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff)
 \f
 #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 *);
+#include "unexec.h"
 
 DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0,
        doc: /* Dump current state of Emacs into executable file FILENAME.
index fe9d13d..612d7c1 100644 (file)
@@ -40,6 +40,8 @@ what you give them.   Help stamp out software-hoarding!  */
  */
 
 #include <config.h>
+#include "unexec.h"
+
 #define PERROR(file) report_error (file, new)
 #include <a.out.h>
 /* Define getpagesize () if the system does not.
index 4dafaba..1efde1a 100644 (file)
@@ -50,6 +50,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
  */
 
 #include <config.h>
+#include "unexec.h"
+
 #define PERROR(file) report_error (file, new)
 
 #ifndef CANNOT_DUMP  /* all rest of file!  */
index 02add90..b5d72e6 100644 (file)
@@ -19,6 +19,8 @@ You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
+#include "unexec.h"
+
 #include <setjmp.h>
 #include <lisp.h>
 #include <stdio.h>
@@ -299,4 +301,3 @@ unexec (const char *outfile, const char *infile)
 
   return (0);
 }
-
index 1009c87..182b9f8 100644 (file)
@@ -386,6 +386,8 @@ temacs:
    Instead we read the whole file, modify it, and write it out.  */
 
 #include <config.h>
+#include <unexec.h>
+
 extern void fatal (const char *msgid, ...);
 
 #include <sys/types.h>
index c047199..9889ffd 100644 (file)
@@ -50,6 +50,8 @@
 */
 \f
 #include <config.h>
+#include "unexec.h"
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>
@@ -319,4 +321,3 @@ display_header (hdr, auxhdr)
          hdr->unloadable_sp_location, hdr->unloadable_sp_size);
 }
 #endif /* DEBUG */
-
index 2e46c06..0df0bb8 100644 (file)
@@ -95,6 +95,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef malloc
 #undef realloc
 #undef free
+
+#include "unexec.h"
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdarg.h>
index e1a10f7..ae91c17 100644 (file)
@@ -1,6 +1,8 @@
 /* Trivial unexec for Solaris.  */
 
 #include <config.h>
+#include "unexec.h"
+
 #include <dlfcn.h>
 #include <setjmp.h>
 
index 829c864..c921cd6 100644 (file)
@@ -21,6 +21,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 */
 
 #include <config.h>
+#include "unexec.h"
 
 #include <stdio.h>
 #include <fcntl.h>