delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/06/01:33:56

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <001101c105e5$c8f69f20$c5823bd5@dima>
From: "Dmitry Timoshkov" <dmitry AT baikal DOT ru>
To: <cygwin AT cygwin DOT com>
Subject: windres bug + fix
Date: Fri, 6 Jul 2001 14:33:55 +0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

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  <dmitry AT codeweavers DOT com>

 * 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019