plist module
[bpt/emacs.git] / src / unexsol.c
CommitLineData
acb46fd4
RS
1/* Trivial unexec for Solaris. */
2
3#include <config.h>
ce701a33
PE
4#include "unexec.h"
5
acb46fd4
RS
6#include <dlfcn.h>
7
8#include "lisp.h"
e5560ff7 9#include "character.h"
dad0e4f4
MR
10#include "buffer.h"
11#include "charset.h"
12#include "coding.h"
acb46fd4 13
381259ef 14void
dd5ecd6b 15unexec (const char *new_name, const char *old_name)
acb46fd4 16{
fdebad64
RS
17 Lisp_Object data;
18 Lisp_Object errstring;
acb46fd4 19
fdebad64 20 if (! dldump (0, new_name, RTLD_MEMORY))
381259ef 21 return;
fdebad64 22
6c6f1994 23 data = list1 (build_string (new_name));
fdebad64
RS
24 synchronize_system_messages_locale ();
25 errstring = code_convert_string_norecord (build_string (dlerror ()),
26 Vlocale_coding_system, 0);
27
dbfcf224 28 xsignal (Qfile_error,
fdebad64 29 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
acb46fd4 30}