Port to Solaris 10 and its bundled GCC.
[emacs.git] / src / unexsol.c
blobcfd515ff504006156c7ee50c4c16ae076e4f8930
1 /* Trivial unexec for Solaris. */
3 #include <config.h>
4 #include "unexec.h"
6 #include <dlfcn.h>
8 #include "lisp.h"
9 #include "character.h"
10 #include "buffer.h"
11 #include "charset.h"
12 #include "coding.h"
14 void
15 unexec (const char *new_name, const char *old_name)
17 Lisp_Object data;
18 Lisp_Object errstring;
20 if (! dldump (0, new_name, RTLD_MEMORY))
21 return;
23 data = list1 (build_string (new_name));
24 synchronize_system_messages_locale ();
25 errstring = code_convert_string_norecord (build_string (dlerror ()),
26 Vlocale_coding_system, 0);
28 xsignal (Qfile_error,
29 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));