]> code.delx.au - gnu-emacs/commitdiff
Change unexec implementations to match prototype.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Mar 2011 18:41:30 +0000 (11:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Mar 2011 18:41:30 +0000 (11:41 -0700)
src/ChangeLog
src/unexaix.c
src/unexcoff.c
src/unexcw.c
src/unexhp9k800.c
src/unexmacosx.c
src/unexsol.c
src/unexw32.c

index d97969c24dbd26b18879f83062ef1a0ace3261fb..acc3f0308ed8e04a5e7f41f7edb425109434bebf 100644 (file)
@@ -36,6 +36,7 @@
        * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
        * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
        * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
+       Change as necessary to match prototype in unexec.h.
 
        * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
        shadowing.
index 612d7c1fecf603eaa1bf5f99b1550f8da84de6c2..e6aad2db775741cf0d520647a7f7386a96c7141a 100644 (file)
@@ -121,7 +121,8 @@ static void write_segment (int, char *, char *);
  *
  * driving logic.
  */
-int unexec (const char *new_name, const char *a_name)
+void
+unexec (const char *new_name, const char *a_name)
 {
   int new = -1, a_out = -1;
 
@@ -141,14 +142,12 @@ int unexec (const char *new_name, const char *a_name)
       || unrelocate_symbols (new, a_out, a_name, new_name) < 0)
     {
       close (new);
-      return -1;
     }
 
   close (new);
   if (a_out >= 0)
     close (a_out);
   mark_x (new_name);
-  return 0;
 }
 
 /* ****************************************************************
@@ -639,4 +638,3 @@ start_of_text (void)
 {
   return ((char *) 0x10000000);
 }
-
index 1efde1a9cbcea35969835abf8b80194f67ee14c1..03b0015e6b9ea232ddbf29172398d2f4001dab2a 100644 (file)
@@ -524,7 +524,7 @@ adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name)
  *
  * driving logic.
  */
-int
+void
 unexec (const char *new_name, const char *a_name)
 {
   int new = -1, a_out = -1;
@@ -545,15 +545,12 @@ unexec (const char *new_name, const char *a_name)
       )
     {
       close (new);
-      return -1;
     }
 
   close (new);
   if (a_out >= 0)
     close (a_out);
   mark_x (new_name);
-  return 0;
 }
 
 #endif /* not CANNOT_DUMP */
-
index b5d72e615500da73b45e0487a432cbc6d122f743..1202e046024c435e82cf87ad0b70774f863e854a 100644 (file)
@@ -249,7 +249,7 @@ add_exe_suffix_if_necessary (const char *name, char *modified)
   return (modified);
 }
 
-int
+void
 unexec (const char *outfile, const char *infile)
 {
   char infile_buffer[FILENAME_MAX];
@@ -263,7 +263,6 @@ unexec (const char *outfile, const char *infile)
     {
       /* can only dump once */
       printf ("You can only dump Emacs once on this platform.\n");
-      return (1);
     }
 
   report_sheap_usage (1);
@@ -298,6 +297,4 @@ unexec (const char *outfile, const char *infile)
 
   ret = close (fd_out);
   assert (ret == 0);
-
-  return (0);
 }
index 9889ffd63fc40749552f17560f45aafc791a8ae0..f27415a252cf90e18a672940f4cd3742a7a75568 100644 (file)
@@ -76,7 +76,7 @@ run_time_remap (ignored)
 
 
 /* Create a new a.out file, same as old but with current data space */
-int
+void
 unexec (const char *new_name,      /* name of the new a.out file to be created */
        const char *old_name)       /* name of the old a.out file */
 {
@@ -133,7 +133,6 @@ unexec (const char *new_name,      /* name of the new a.out file to be created *
   /* Close the binary file */
   close (old);
   close (new);
-  return 0;
 }
 
 /* Save current data space in the file, update header.  */
index 0df0bb8451d17f6a7f4b440fbdedd03f665368ac..04e3edf463e5fd50b134c7aa6b6d86496f3cfe2d 100644 (file)
@@ -1227,7 +1227,7 @@ dump_it (void)
    from it.  The file names of the output and input files are outfile
    and infile, respectively.  The three other parameters are
    ignored.  */
-int
+void
 unexec (const char *outfile, const char *infile)
 {
   if (in_dumped_exec)
@@ -1258,7 +1258,6 @@ unexec (const char *outfile, const char *infile)
   dump_it ();
 
   close (outfd);
-  return 0;
 }
 
 
@@ -1383,4 +1382,3 @@ unexec_free (void *ptr)
   else
     malloc_zone_free (emacs_zone, (unexec_malloc_header_t *) ptr - 1);
 }
-
index ae91c1708593c15cb1cd279ecdf37d8ce9f4f68a..ef1e34e6f0f63fc9261bbbe52dba55874f3fc59a 100644 (file)
 #include "charset.h"
 #include "coding.h"
 
-int
+void
 unexec (const char *new_name, const char *old_name)
 {
   Lisp_Object data;
   Lisp_Object errstring;
 
   if (! dldump (0, new_name, RTLD_MEMORY))
-    return 0;
+    return;
 
   data = Fcons (build_string (new_name), Qnil);
   synchronize_system_messages_locale ();
@@ -28,4 +28,3 @@ unexec (const char *new_name, const char *old_name)
   xsignal (Qfile_error,
           Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
 }
-
index c921cd657d569ba6fcf199190c271334cb282873..cd8211d6bee5828d0952ee525cfe2a10e668275c 100644 (file)
@@ -724,7 +724,7 @@ copy_executable_and_dump_data (file_data *p_infile,
 
 
 /* Dump out .data and .bss sections into a new executable.  */
-int
+void
 unexec (const char *new_name, const char *old_name)
 {
   file_data in_file, out_file;
@@ -820,9 +820,6 @@ unexec (const char *new_name, const char *old_name)
 
   close_file_data (&in_file);
   close_file_data (&out_file);
-
-  return 0;
 }
 
 /* eof */
-