annotate src/unexsol.c @ 105669:68dd71358159

* alloc.c: Do not define struct catchtag. * eval.c: Move struct catchtag definition ... * lisp.h: ... here. * image.c: Move png.h #include earlier to avoid warnings. * xterm.c: * xsmfns.c: * xselect.c: * xrdb.c: * xmenu.c: * xftfont.c: * xfont.c: * xfns.c: * xfaces.c: * xdisp.c: * window.c: * widget.c: * w32xfns.c: * w32uniscribe.c: * w32term.c: * w32select.c: * w32reg.c: * w32proc.c: * w32menu.c: * w32inevt.c: * w32heap.c: * w32font.c: * w32fns.c: * w32console.c: * w32.c: * w16select.c: * vm-limit.c: * unexsol.c: * unexec.c: * unexcw.c: * unexaix.c: * undo.c: * tparam.c: * textprop.c: * terminfo.c: * terminal.c: * termcap.c: * term.c: * syntax.c: * sound.c: * sheap.c: * search.c: * scroll.c: * region-cache.c: * regex.c: * ralloc.c: * process.c: * print.c: * msdos.c: * minibuf.c: * menu.c: * marker.c: * macros.c: * keymap.c: * keyboard.c: * intervals.c: * insdel.c: * indent.c: * gtkutil.c: * ftxfont.c: * ftfont.c: * fringe.c: * frame.c: * fontset.c: * font.c: * fns.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c: * editfns.c: * dosfns.c: * doprnt.c: * doc.c: * dispnew.c: * dired.c: * dbusbind.c: * data.c: * composite.c: * coding.c: * cmds.c: * cm.c: * chartab.c: * charset.c: * character.c: * ccl.c: * category.c: * casetab.c: * casefiddle.c: * callproc.c: * callint.c: * bytecode.c: * buffer.c: * atimer.c: Include setjmp.h. (Bug#4643) * xlwmenu.c: * lwlib.c: * lwlib-utils.c: * lwlib-Xm.c: * lwlib-Xlw.c: * lwlib-Xaw.c: Include setjmp.h.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 19 Oct 2009 04:27:09 +0000
parents b7bf941f8049
children 55c8c3ca3d48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47190
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 /* Trivial unexec for Solaris. */
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 #include <config.h>
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 #include <stdlib.h>
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 #include <dlfcn.h>
105669
68dd71358159 * alloc.c: Do not define struct catchtag.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 71990
diff changeset
6 #include <setjmp.h>
47190
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 #include "lisp.h"
47441
d671a35d55f3 Include buffer.h, charset.h, coding.h.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47432
diff changeset
9 #include "buffer.h"
d671a35d55f3 Include buffer.h, charset.h, coding.h.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47432
diff changeset
10 #include "charset.h"
d671a35d55f3 Include buffer.h, charset.h, coding.h.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47432
diff changeset
11 #include "coding.h"
47190
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 int
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 unexec (char *new_name, char *old_name, unsigned int data_start,
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 unsigned int bss_start, unsigned int entry_address)
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 {
47432
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
17 Lisp_Object data;
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
18 Lisp_Object errstring;
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
19
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
20 if (! dldump (0, new_name, RTLD_MEMORY))
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
21 return 0;
47190
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22
47432
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
23 data = Fcons (build_string (new_name), Qnil);
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
24 synchronize_system_messages_locale ();
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
25 errstring = code_convert_string_norecord (build_string (dlerror ()),
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
26 Vlocale_coding_system, 0);
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
27
71990
b7bf941f8049 (unexec): Use xsignal.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
28 xsignal (Qfile_error,
47432
16b9af83e7d3 Don't use report_file_error; do it by hand using dlerror.
Richard M. Stallman <rms@gnu.org>
parents: 47190
diff changeset
29 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
47190
85923ab92112 Initial version.
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 }
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47472
diff changeset
31
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47472
diff changeset
32 /* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47472
diff changeset
33 (do not change this comment) */