* 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.
+ Change as necessary to match prototype in unexec.h.
* syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
shadowing.
*
* driving logic.
*/
-int unexec (const char *new_name, const char *a_name)
+void
+unexec (const char *new_name, const char *a_name)
{
int new = -1, a_out = -1;
|| unrelocate_symbols (new, a_out, a_name, new_name) < 0)
{
close (new);
- return -1;
}
close (new);
if (a_out >= 0)
close (a_out);
mark_x (new_name);
- return 0;
}
/* ****************************************************************
{
return ((char *) 0x10000000);
}
-
*
* driving logic.
*/
-int
+void
unexec (const char *new_name, const char *a_name)
{
int new = -1, a_out = -1;
)
{
close (new);
- return -1;
}
close (new);
if (a_out >= 0)
close (a_out);
mark_x (new_name);
- return 0;
}
#endif /* not CANNOT_DUMP */
-
return (modified);
}
-int
+void
unexec (const char *outfile, const char *infile)
{
char infile_buffer[FILENAME_MAX];
{
/* can only dump once */
printf ("You can only dump Emacs once on this platform.\n");
- return (1);
}
report_sheap_usage (1);
ret = close (fd_out);
assert (ret == 0);
-
- return (0);
}
/* Create a new a.out file, same as old but with current data space */
-int
+void
unexec (const char *new_name, /* name of the new a.out file to be created */
const char *old_name) /* name of the old a.out file */
{
/* Close the binary file */
close (old);
close (new);
- return 0;
}
/* Save current data space in the file, update header. */
from it. The file names of the output and input files are outfile
and infile, respectively. The three other parameters are
ignored. */
-int
+void
unexec (const char *outfile, const char *infile)
{
if (in_dumped_exec)
dump_it ();
close (outfd);
- return 0;
}
else
malloc_zone_free (emacs_zone, (unexec_malloc_header_t *) ptr - 1);
}
-
#include "charset.h"
#include "coding.h"
-int
+void
unexec (const char *new_name, const char *old_name)
{
Lisp_Object data;
Lisp_Object errstring;
if (! dldump (0, new_name, RTLD_MEMORY))
- return 0;
+ return;
data = Fcons (build_string (new_name), Qnil);
synchronize_system_messages_locale ();
xsignal (Qfile_error,
Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
}
-
/* Dump out .data and .bss sections into a new executable. */
-int
+void
unexec (const char *new_name, const char *old_name)
{
file_data in_file, out_file;
close_file_data (&in_file);
close_file_data (&out_file);
-
- return 0;
}
/* eof */
-