mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-10 01:34:36 -08:00
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.
31 lines
717 B
C
31 lines
717 B
C
/* Trivial unexec for Solaris. */
|
|
|
|
#include <config.h>
|
|
#include <dlfcn.h>
|
|
#include <setjmp.h>
|
|
|
|
#include "lisp.h"
|
|
#include "buffer.h"
|
|
#include "charset.h"
|
|
#include "coding.h"
|
|
|
|
int
|
|
unexec (const char *new_name, const char *old_name)
|
|
{
|
|
Lisp_Object data;
|
|
Lisp_Object errstring;
|
|
|
|
if (! dldump (0, new_name, RTLD_MEMORY))
|
|
return 0;
|
|
|
|
data = Fcons (build_string (new_name), Qnil);
|
|
synchronize_system_messages_locale ();
|
|
errstring = code_convert_string_norecord (build_string (dlerror ()),
|
|
Vlocale_coding_system, 0);
|
|
|
|
xsignal (Qfile_error,
|
|
Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
|
|
}
|
|
|
|
/* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59
|
|
(do not change this comment) */
|