summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog8
-rw-r--r--src/deps.mk18
-rw-r--r--src/emacs.c4
-rw-r--r--src/unexaix.c2
-rw-r--r--src/unexcoff.c2
-rw-r--r--src/unexcw.c3
-rw-r--r--src/unexelf.c2
-rw-r--r--src/unexhp9k800.c3
-rw-r--r--src/unexmacosx.c3
-rw-r--r--src/unexsol.c2
-rw-r--r--src/unexw32.c1
11 files changed, 34 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7bc0a8fcc49..14d3e37a8ee 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/deps.mk b/src/deps.mk
index 80a5721cf39..c868ff0e3c0 100644
--- a/src/deps.mk
+++ b/src/deps.mk
@@ -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 \
diff --git a/src/emacs.c b/src/emacs.c
index c49e38f7a67..d30d42f1ee4 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -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.
diff --git a/src/unexaix.c b/src/unexaix.c
index fe9d13d3e47..612d7c1fecf 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -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.
diff --git a/src/unexcoff.c b/src/unexcoff.c
index 4dafabab689..1efde1a9cbc 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -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! */
diff --git a/src/unexcw.c b/src/unexcw.c
index 02add901bbd..b5d72e61550 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -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);
}
-
diff --git a/src/unexelf.c b/src/unexelf.c
index 1009c87066b..182b9f8a16b 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -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>
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c
index c0471992a72..9889ffd63fc 100644
--- a/src/unexhp9k800.c
+++ b/src/unexhp9k800.c
@@ -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 */
-
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 2e46c063e95..0df0bb8451d 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -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>
diff --git a/src/unexsol.c b/src/unexsol.c
index e1a10f7d211..ae91c170859 100644
--- a/src/unexsol.c
+++ b/src/unexsol.c
@@ -1,6 +1,8 @@
/* Trivial unexec for Solaris. */
#include <config.h>
+#include "unexec.h"
+
#include <dlfcn.h>
#include <setjmp.h>
diff --git a/src/unexw32.c b/src/unexw32.c
index 829c864c960..c921cd657d5 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -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>