This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: windres bug.
- To: binutils <binutils at sourceware dot cygnus dot com>
- Subject: Re: windres bug.
- From: Tom Walsh <tom at cyberiansoftware dot com>
- Date: Sun, 08 Jul 2001 09:01:27 -0400
- References: <3B484941.935A9538@cyberiansoftware.com>
This is the patchfile for two changes in windres v2.11.90
binutils/configure: to allow '--with-windres' to be specified as an
option.
binutils/resres.c: repair of write_res_header() to correct the DWORD
count.
Regards,
TomW
--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
diff -Nr -U 6 binutils-2.11.2/binutils/configure binutils-2.11.2.new/binutils/configure
--- binutils-2.11.2/binutils/configure Mon Jun 11 06:04:27 2001
+++ binutils-2.11.2.new/binutils/configure Sun Jul 8 08:42:34 2001
@@ -5435,12 +5435,15 @@
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
esac
fi
done
+if test "${with_windres+set}" = set; then
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+fi
diff -Nr -U 6 binutils-2.11.2/binutils/resres.c binutils-2.11.2.new/binutils/resres.c
--- binutils-2.11.2/binutils/resres.c Sun Sep 19 19:59:35 1999
+++ binutils-2.11.2.new/binutils/resres.c Sun Jul 8 08:48:26 2001
@@ -383,12 +383,14 @@
const struct res_id *name;
const struct res_res_info *resinfo;
{
struct res_hdr reshdr;
reshdr.data_size = datasize;
reshdr.header_size = 24 + get_id_size (type) + get_id_size (name);
+ /* align header_size to a DWORD boundry. */
+ reshdr.header_size += reshdr.header_size % 4;
res_align_file ();
write_res_data (&reshdr, sizeof (reshdr), 1);
write_res_id (type);
write_res_id (name);