Thu, 24 Nov 2005 13:00:45 -0500, you wrote:
Steve Youngs <steve(a)sxemacs.org> writes:
> APPROVE COMMIT 21.5 RECOMMEND 21.4
>
> Thanks very much for this patch, Andrey. Please send your future
> XEmacs contributions to xemacs-patches(a)xemacs.org.
>
> Vin, looks to me like this is needed in 21.4 too.
>
> NOTE: This patch has been committed.
Andrey -
This patch does not apply to 21.4. The Extbyte stuff is a 21.5-ism.
Is this really necessary for 21.4?
No, it's not needed for 21.4 now. It's needed, when add
`#include lisp.h' to unexelf.c. See backport from 21.5:
--8<---------------cut here---------------start------------->8---
Index: src/unexelf.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/unexelf.c,v
retrieving revision 1.15.2.2
diff -u -r1.15.2.2 unexelf.c
--- src/unexelf.c 2005/01/11 02:02:38 1.15.2.2
+++ src/unexelf.c 2005/11/01 09:16:06
@@ -413,6 +413,7 @@
#define fatal(a, b, c) fprintf (stderr, a, b, c), exit (1)
#else
#include <config.h>
+#include "lisp.h"
extern void fatal (const char *, ...);
#endif
@@ -571,11 +572,9 @@
* .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 data_start,
- unsigned int bss_start, unsigned int entry_address)
+int
+unexec (char *new_name, char *old_name, uintptr_t data_start,
+ uintptr_t bss_start, uintptr_t entry_address)
{
int new_file, old_file, new_file_size;
@@ -645,7 +644,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++)
@@ -722,7 +721,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
@@ -805,7 +804,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
@@ -815,7 +814,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. */
@@ -846,7 +845,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. */
@@ -1188,4 +1187,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;
}
--8<---------------cut here---------------end--------------->8---
--
Regards,
Andrey.