Commit | Line | Data |
---|---|---|
acb46fd4 RS |
1 | /* Trivial unexec for Solaris. */ |
2 | ||
3 | #include <config.h> | |
acb46fd4 | 4 | #include <dlfcn.h> |
d7306fe6 | 5 | #include <setjmp.h> |
acb46fd4 RS |
6 | |
7 | #include "lisp.h" | |
dad0e4f4 MR |
8 | #include "buffer.h" |
9 | #include "charset.h" | |
10 | #include "coding.h" | |
acb46fd4 RS |
11 | |
12 | int | |
dd5ecd6b | 13 | unexec (const char *new_name, const char *old_name) |
acb46fd4 | 14 | { |
fdebad64 RS |
15 | Lisp_Object data; |
16 | Lisp_Object errstring; | |
acb46fd4 | 17 | |
fdebad64 RS |
18 | if (! dldump (0, new_name, RTLD_MEMORY)) |
19 | return 0; | |
20 | ||
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 | ||
dbfcf224 | 26 | xsignal (Qfile_error, |
fdebad64 | 27 | Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); |
acb46fd4 | 28 | } |
ab5796a9 | 29 |