Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Fri, 6 Jul 2001 01:36:03 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: windres bug + fix Message-ID: <20010706013603.A31335@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <001101c105e5$c8f69f20$c5823bd5 AT dima> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <001101c105e5$c8f69f20$c5823bd5@dima>; from dmitry@baikal.ru on Fri, Jul 06, 2001 at 02:33:55PM +0800 Please send this patch to binutils AT sources DOT redhat DOT com. Thanks. cgf On Fri, Jul 06, 2001 at 02:33:55PM +0800, Dmitry Timoshkov wrote: >Hello. > >This simple resource file causes windres to fail: > >rc -r windres_bug.rc >windres -I res -O coff -o windres_bug.res.o -i windres_bug.res > >-- cut here: windres_bug.rc -- >1 RCDATA >BEGIN >"text1" >END > >2 RCDATA >BEGIN >"text2" >END >-- cut here -- > >The patch below fixes it. I have tested the patch with many different >resource files and it seem to have no side effects. > >Dmitry Timoshkov > > * resres.c (read_resource_entry): Align after reading data. > >--- binutils-20010425-2/binutils/resres.c Fri Jul 06 04:38:02 2001 >+++ resres.c Fri Jul 06 04:39:34 2001 >@@ -177,6 +177,9 @@ > buff = res_alloc (reshdr.data_size); > /* Read data */ > read_res_data (buff, reshdr.data_size, 1); >+ >+ res_align_file (); >+ > /* Convert binary data to resource */ > r = bin_to_res (type, buff, reshdr.data_size, 0); > r->res_info = resinfo; > >P.S. >Why Cygwin version of binutils is so different from the official release >of binutils 2.11.2? Is it expected to have both branches merged? >-- >Dmitry at Baikal.ru -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/