# HG changeset patch # User crestani # Date 1120482687 0 # Node ID eae9afc261a95ac56649c65111cc9807966c74e6 # Parent c8e654c9a6b2945f031cef098e572fae630fd75d [xemacs-hg @ 2005-07-04 13:11:25 by crestani] 2005-06-29 Marcus Crestani Fix C++ build for unexec. * unexelf.c: Adjust fatal and unexec to the declarations in lisp.h. * unexelf.c (unexec): Remove unneeded arguments from fatal calls. diff -r c8e654c9a6b2 -r eae9afc261a9 src/ChangeLog --- a/src/ChangeLog Sun Jul 03 21:50:50 2005 +0000 +++ b/src/ChangeLog Mon Jul 04 13:11:27 2005 +0000 @@ -1,3 +1,10 @@ +2005-06-29 Marcus Crestani + + Fix C++ build for unexec. + * unexelf.c: Adjust fatal and unexec to the declarations in + lisp.h. + * unexelf.c (unexec): Remove unneeded arguments from fatal calls. + 2005-07-03 Aidan Kehoe * event-Xt.c: diff -r c8e654c9a6b2 -r eae9afc261a9 src/unexelf.c --- a/src/unexelf.c Sun Jul 03 21:50:50 2005 +0000 +++ b/src/unexelf.c Mon Jul 04 13:11:27 2005 +0000 @@ -413,7 +413,8 @@ #define fatal(a, b, c) fprintf (stderr, a, b, c), exit (1) #else #include -extern void fatal (const char *, ...); +#include "lisp.h" +extern DOESNT_RETURN fatal (const CIbyte *, ...); #endif #include @@ -563,10 +564,8 @@ * .data section, and inserting an empty .bss immediately afterwards. * */ -void unexec (char *new_name, char *old_name, unsigned int data_start, - unsigned int bss_start, unsigned int entry_address); -void -unexec (char *new_name, char *old_name, unsigned int UNUSED (data_start), +int +unexec (Extbyte *new_name, Extbyte *old_name, unsigned int UNUSED (data_start), unsigned int UNUSED (bss_start), unsigned int UNUSED (entry_address)) { int new_file, old_file, new_file_size; @@ -637,7 +636,7 @@ break; } if (old_bss_index == old_file_h->e_shnum) - fatal ("Can't find .bss in %s.\n", old_name, 0); + fatal ("Can't find .bss in %s.\n", old_name); for (old_sbss_index = 1; old_sbss_index < (int) old_file_h->e_shnum; old_sbss_index++) @@ -714,7 +713,7 @@ #endif if ((unsigned) new_bss_addr < (unsigned) old_bss_addr + old_bss_size) - fatal (".bss shrank when undumping???\n", 0, 0); + fatal (".bss shrank when undumping???\n"); /* Set the output file to the right size and mmap it. Set * pointers to various interesting objects. stat_buf still has @@ -797,7 +796,7 @@ > (old_sbss_index == -1 ? old_bss_addr : round_up (old_bss_addr, alignment))) - fatal ("Program segment above .bss in %s\n", old_name, 0); + fatal ("Program segment above .bss in %s\n", old_name); if (NEW_PROGRAM_H (n).p_type == PT_LOAD && (round_up ((NEW_PROGRAM_H (n)).p_vaddr @@ -807,7 +806,7 @@ break; } if (n < 0) - fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0); + fatal ("Couldn't find segment next to .bss in %s\n", old_name); /* Make sure that the size includes any padding before the old .bss section. */ @@ -838,7 +837,7 @@ ".data")) break; if (old_data_index == old_file_h->e_shnum) - fatal ("Can't find .data in %s.\n", old_name, 0); + fatal ("Can't find .data in %s.\n", old_name); /* Walk through all section headers, insert the new data2 section right before the new bss section. */ @@ -1180,4 +1179,5 @@ stat_buf.st_mode |= 0111 & ~n; if (chmod (new_name, stat_buf.st_mode) == -1) fatal ("Can't chmod (%s): errno %d\n", new_name, errno); + return 0; }