47190
|
1 /* Trivial unexec for Solaris. */
|
|
2
|
|
3 #include <config.h>
|
|
4 #include <dlfcn.h>
|
105669
|
5 #include <setjmp.h>
|
47190
|
6
|
|
7 #include "lisp.h"
|
47441
|
8 #include "buffer.h"
|
|
9 #include "charset.h"
|
|
10 #include "coding.h"
|
47190
|
11
|
|
12 int
|
110729
|
13 unexec (const char *new_name, const char *old_name)
|
47190
|
14 {
|
47432
|
15 Lisp_Object data;
|
|
16 Lisp_Object errstring;
|
|
17
|
|
18 if (! dldump (0, new_name, RTLD_MEMORY))
|
|
19 return 0;
|
47190
|
20
|
47432
|
21 data = Fcons (build_string (new_name), Qnil);
|
|
22 synchronize_system_messages_locale ();
|
|
23 errstring = code_convert_string_norecord (build_string (dlerror ()),
|
|
24 Vlocale_coding_system, 0);
|
|
25
|
71990
|
26 xsignal (Qfile_error,
|
47432
|
27 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
|
47190
|
28 }
|
52401
|
29
|
|
30 /* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59
|
|
31 (do not change this comment) */
|