view src/unexsol.c @ 110507:875202ac5b45

Fix use of int instead of EMACS_INT in search.c and region-cache.c. indent.c (compute_motion): Use EMACS_INT for arguments to region_cache_forward. region-cache.c (struct boundary, struct region_cache): Use EMACS_INT for positions. (find_cache_boundary, move_cache_gap, insert_cache_boundary) (delete_cache_boundaries, set_cache_region) (invalidate_region_cache, know_region_cache) (region_cache_forward, region_cache_backward, pp_cache): Use EMACS_INT for buffer positions. region-cache.h (know_region_cache, invalidate_region_cache) (region_cache_forward, region_cache_backward): Adjust prototypes. search.c (string_match_1, fast_c_string_match_ignore_case) (looking_at_1, scan_buffer, scan_newline) (find_next_newline_no_quit, find_before_next_newline) (search_command, trivial_regexp_p, search_buffer, simple_search) (boyer_moore, wordify, Freplace_match): Use EMACS_INT for buffer and string positions and length. lisp.h (scan_buffer, scan_newline, find_next_newline_no_quit) (find_before_next_newline): Adjust prototypes.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 23 Sep 2010 14:35:11 -0400
parents 68dd71358159
children 55c8c3ca3d48
line wrap: on
line source

/* Trivial unexec for Solaris.  */

#include <config.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <setjmp.h>

#include "lisp.h"
#include "buffer.h"
#include "charset.h"
#include "coding.h"

int
unexec (char *new_name, char *old_name, unsigned int data_start,
        unsigned int bss_start, unsigned int entry_address)
{
  Lisp_Object data;
  Lisp_Object errstring;

  if (! dldump (0, new_name, RTLD_MEMORY))
    return 0;

  data = Fcons (build_string (new_name), Qnil);
  synchronize_system_messages_locale ();
  errstring = code_convert_string_norecord (build_string (dlerror ()),
					    Vlocale_coding_system, 0);

  xsignal (Qfile_error,
	   Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
}

/* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59
   (do not change this comment) */