(Search and Replace): Fix arg order for perform-replace.
[emacs.git] / src / unexsol.c
blob41ad95ef51c5f5af64c79540a174855d29e45f06
1 /* Trivial unexec for Solaris. */
3 #include <config.h>
4 #include <stdlib.h>
5 #include <dlfcn.h>
7 #include "lisp.h"
9 int
10 unexec (char *new_name, char *old_name, unsigned int data_start,
11 unsigned int bss_start, unsigned int entry_address)
13 Lisp_Object data;
14 Lisp_Object errstring;
16 if (! dldump (0, new_name, RTLD_MEMORY))
17 return 0;
19 data = Fcons (build_string (new_name), Qnil);
20 synchronize_system_messages_locale ();
21 errstring = code_convert_string_norecord (build_string (dlerror ()),
22 Vlocale_coding_system, 0);
24 /* System error messages are capitalized. Downcase the initial
25 unless it is followed by a slash. */
26 if (SREF (errstring, 1) != '/')
27 SSET (errstring, 0, DOWNCASE (SREF (errstring, 0)));
29 Fsignal (Qfile_error,
30 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));