diff options
| author | Paul Eggert | 2011-03-17 11:41:30 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-17 11:41:30 -0700 |
| commit | 381259ef0debba4c0bb07bb5473467c1d4d84223 (patch) | |
| tree | a6bc6304596874e7cb6cb3074b0b922c4cadba85 /src | |
| parent | a3a6c54ec72118e8d22d2ecd608df5193c8926a3 (diff) | |
| download | emacs-381259ef0debba4c0bb07bb5473467c1d4d84223.tar.gz emacs-381259ef0debba4c0bb07bb5473467c1d4d84223.zip | |
Change unexec implementations to match prototype.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/unexaix.c | 6 | ||||
| -rw-r--r-- | src/unexcoff.c | 5 | ||||
| -rw-r--r-- | src/unexcw.c | 5 | ||||
| -rw-r--r-- | src/unexhp9k800.c | 3 | ||||
| -rw-r--r-- | src/unexmacosx.c | 4 | ||||
| -rw-r--r-- | src/unexsol.c | 5 | ||||
| -rw-r--r-- | src/unexw32.c | 5 |
8 files changed, 10 insertions, 24 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d97969c24db..acc3f0308ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | * emacs.c [!defined CANNOT_DUMP]: Include unexec.h. | 36 | * emacs.c [!defined CANNOT_DUMP]: Include unexec.h. |
| 37 | * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c: | 37 | * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c: |
| 38 | * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h. | 38 | * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h. |
| 39 | Change as necessary to match prototype in unexec.h. | ||
| 39 | 40 | ||
| 40 | * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid | 41 | * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid |
| 41 | shadowing. | 42 | shadowing. |
diff --git a/src/unexaix.c b/src/unexaix.c index 612d7c1fecf..e6aad2db775 100644 --- a/src/unexaix.c +++ b/src/unexaix.c | |||
| @@ -121,7 +121,8 @@ static void write_segment (int, char *, char *); | |||
| 121 | * | 121 | * |
| 122 | * driving logic. | 122 | * driving logic. |
| 123 | */ | 123 | */ |
| 124 | int unexec (const char *new_name, const char *a_name) | 124 | void |
| 125 | unexec (const char *new_name, const char *a_name) | ||
| 125 | { | 126 | { |
| 126 | int new = -1, a_out = -1; | 127 | int new = -1, a_out = -1; |
| 127 | 128 | ||
| @@ -141,14 +142,12 @@ int unexec (const char *new_name, const char *a_name) | |||
| 141 | || unrelocate_symbols (new, a_out, a_name, new_name) < 0) | 142 | || unrelocate_symbols (new, a_out, a_name, new_name) < 0) |
| 142 | { | 143 | { |
| 143 | close (new); | 144 | close (new); |
| 144 | return -1; | ||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | close (new); | 147 | close (new); |
| 148 | if (a_out >= 0) | 148 | if (a_out >= 0) |
| 149 | close (a_out); | 149 | close (a_out); |
| 150 | mark_x (new_name); | 150 | mark_x (new_name); |
| 151 | return 0; | ||
| 152 | } | 151 | } |
| 153 | 152 | ||
| 154 | /* **************************************************************** | 153 | /* **************************************************************** |
| @@ -639,4 +638,3 @@ start_of_text (void) | |||
| 639 | { | 638 | { |
| 640 | return ((char *) 0x10000000); | 639 | return ((char *) 0x10000000); |
| 641 | } | 640 | } |
| 642 | |||
diff --git a/src/unexcoff.c b/src/unexcoff.c index 1efde1a9cbc..03b0015e6b9 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c | |||
| @@ -524,7 +524,7 @@ adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name) | |||
| 524 | * | 524 | * |
| 525 | * driving logic. | 525 | * driving logic. |
| 526 | */ | 526 | */ |
| 527 | int | 527 | void |
| 528 | unexec (const char *new_name, const char *a_name) | 528 | unexec (const char *new_name, const char *a_name) |
| 529 | { | 529 | { |
| 530 | int new = -1, a_out = -1; | 530 | int new = -1, a_out = -1; |
| @@ -545,15 +545,12 @@ unexec (const char *new_name, const char *a_name) | |||
| 545 | ) | 545 | ) |
| 546 | { | 546 | { |
| 547 | close (new); | 547 | close (new); |
| 548 | return -1; | ||
| 549 | } | 548 | } |
| 550 | 549 | ||
| 551 | close (new); | 550 | close (new); |
| 552 | if (a_out >= 0) | 551 | if (a_out >= 0) |
| 553 | close (a_out); | 552 | close (a_out); |
| 554 | mark_x (new_name); | 553 | mark_x (new_name); |
| 555 | return 0; | ||
| 556 | } | 554 | } |
| 557 | 555 | ||
| 558 | #endif /* not CANNOT_DUMP */ | 556 | #endif /* not CANNOT_DUMP */ |
| 559 | |||
diff --git a/src/unexcw.c b/src/unexcw.c index b5d72e61550..1202e046024 100644 --- a/src/unexcw.c +++ b/src/unexcw.c | |||
| @@ -249,7 +249,7 @@ add_exe_suffix_if_necessary (const char *name, char *modified) | |||
| 249 | return (modified); | 249 | return (modified); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | int | 252 | void |
| 253 | unexec (const char *outfile, const char *infile) | 253 | unexec (const char *outfile, const char *infile) |
| 254 | { | 254 | { |
| 255 | char infile_buffer[FILENAME_MAX]; | 255 | char infile_buffer[FILENAME_MAX]; |
| @@ -263,7 +263,6 @@ unexec (const char *outfile, const char *infile) | |||
| 263 | { | 263 | { |
| 264 | /* can only dump once */ | 264 | /* can only dump once */ |
| 265 | printf ("You can only dump Emacs once on this platform.\n"); | 265 | printf ("You can only dump Emacs once on this platform.\n"); |
| 266 | return (1); | ||
| 267 | } | 266 | } |
| 268 | 267 | ||
| 269 | report_sheap_usage (1); | 268 | report_sheap_usage (1); |
| @@ -298,6 +297,4 @@ unexec (const char *outfile, const char *infile) | |||
| 298 | 297 | ||
| 299 | ret = close (fd_out); | 298 | ret = close (fd_out); |
| 300 | assert (ret == 0); | 299 | assert (ret == 0); |
| 301 | |||
| 302 | return (0); | ||
| 303 | } | 300 | } |
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index 9889ffd63fc..f27415a252c 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c | |||
| @@ -76,7 +76,7 @@ run_time_remap (ignored) | |||
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | /* Create a new a.out file, same as old but with current data space */ | 78 | /* Create a new a.out file, same as old but with current data space */ |
| 79 | int | 79 | void |
| 80 | unexec (const char *new_name, /* name of the new a.out file to be created */ | 80 | unexec (const char *new_name, /* name of the new a.out file to be created */ |
| 81 | const char *old_name) /* name of the old a.out file */ | 81 | const char *old_name) /* name of the old a.out file */ |
| 82 | { | 82 | { |
| @@ -133,7 +133,6 @@ unexec (const char *new_name, /* name of the new a.out file to be created * | |||
| 133 | /* Close the binary file */ | 133 | /* Close the binary file */ |
| 134 | close (old); | 134 | close (old); |
| 135 | close (new); | 135 | close (new); |
| 136 | return 0; | ||
| 137 | } | 136 | } |
| 138 | 137 | ||
| 139 | /* Save current data space in the file, update header. */ | 138 | /* Save current data space in the file, update header. */ |
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 0df0bb8451d..04e3edf463e 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -1227,7 +1227,7 @@ dump_it (void) | |||
| 1227 | from it. The file names of the output and input files are outfile | 1227 | from it. The file names of the output and input files are outfile |
| 1228 | and infile, respectively. The three other parameters are | 1228 | and infile, respectively. The three other parameters are |
| 1229 | ignored. */ | 1229 | ignored. */ |
| 1230 | int | 1230 | void |
| 1231 | unexec (const char *outfile, const char *infile) | 1231 | unexec (const char *outfile, const char *infile) |
| 1232 | { | 1232 | { |
| 1233 | if (in_dumped_exec) | 1233 | if (in_dumped_exec) |
| @@ -1258,7 +1258,6 @@ unexec (const char *outfile, const char *infile) | |||
| 1258 | dump_it (); | 1258 | dump_it (); |
| 1259 | 1259 | ||
| 1260 | close (outfd); | 1260 | close (outfd); |
| 1261 | return 0; | ||
| 1262 | } | 1261 | } |
| 1263 | 1262 | ||
| 1264 | 1263 | ||
| @@ -1383,4 +1382,3 @@ unexec_free (void *ptr) | |||
| 1383 | else | 1382 | else |
| 1384 | malloc_zone_free (emacs_zone, (unexec_malloc_header_t *) ptr - 1); | 1383 | malloc_zone_free (emacs_zone, (unexec_malloc_header_t *) ptr - 1); |
| 1385 | } | 1384 | } |
| 1386 | |||
diff --git a/src/unexsol.c b/src/unexsol.c index ae91c170859..ef1e34e6f0f 100644 --- a/src/unexsol.c +++ b/src/unexsol.c | |||
| @@ -11,14 +11,14 @@ | |||
| 11 | #include "charset.h" | 11 | #include "charset.h" |
| 12 | #include "coding.h" | 12 | #include "coding.h" |
| 13 | 13 | ||
| 14 | int | 14 | void |
| 15 | unexec (const char *new_name, const char *old_name) | 15 | unexec (const char *new_name, const char *old_name) |
| 16 | { | 16 | { |
| 17 | Lisp_Object data; | 17 | Lisp_Object data; |
| 18 | Lisp_Object errstring; | 18 | Lisp_Object errstring; |
| 19 | 19 | ||
| 20 | if (! dldump (0, new_name, RTLD_MEMORY)) | 20 | if (! dldump (0, new_name, RTLD_MEMORY)) |
| 21 | return 0; | 21 | return; |
| 22 | 22 | ||
| 23 | data = Fcons (build_string (new_name), Qnil); | 23 | data = Fcons (build_string (new_name), Qnil); |
| 24 | synchronize_system_messages_locale (); | 24 | synchronize_system_messages_locale (); |
| @@ -28,4 +28,3 @@ unexec (const char *new_name, const char *old_name) | |||
| 28 | xsignal (Qfile_error, | 28 | xsignal (Qfile_error, |
| 29 | Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); | 29 | Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); |
| 30 | } | 30 | } |
| 31 | |||
diff --git a/src/unexw32.c b/src/unexw32.c index c921cd657d5..cd8211d6bee 100644 --- a/src/unexw32.c +++ b/src/unexw32.c | |||
| @@ -724,7 +724,7 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 724 | 724 | ||
| 725 | 725 | ||
| 726 | /* Dump out .data and .bss sections into a new executable. */ | 726 | /* Dump out .data and .bss sections into a new executable. */ |
| 727 | int | 727 | void |
| 728 | unexec (const char *new_name, const char *old_name) | 728 | unexec (const char *new_name, const char *old_name) |
| 729 | { | 729 | { |
| 730 | file_data in_file, out_file; | 730 | file_data in_file, out_file; |
| @@ -820,9 +820,6 @@ unexec (const char *new_name, const char *old_name) | |||
| 820 | 820 | ||
| 821 | close_file_data (&in_file); | 821 | close_file_data (&in_file); |
| 822 | close_file_data (&out_file); | 822 | close_file_data (&out_file); |
| 823 | |||
| 824 | return 0; | ||
| 825 | } | 823 | } |
| 826 | 824 | ||
| 827 | /* eof */ | 825 | /* eof */ |
| 828 | |||