Commit ce701a33 authored by Paul Eggert's avatar Paul Eggert

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.
parent 4f63c6bb
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.
......@@ -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 \
......
......@@ -2085,9 +2085,7 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff)
#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.
......
......@@ -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.
......
......@@ -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! */
......
......@@ -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);
}
......@@ -386,6 +386,8 @@ raid:/nfs/raid/src/dist-18.56/src> dump -h 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>
......
......@@ -50,6 +50,8 @@
*/
#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 */
......@@ -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>
......
/* Trivial unexec for Solaris. */
#include <config.h>
#include "unexec.h"
#include <dlfcn.h>
#include <setjmp.h>
......
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment