delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/02/23/11:03:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Tue, 23 Feb 1999 16:53:33 +0000
From: Dirk Meyer <dirk AT plt DOT rwth-aachen DOT de>
Subject: Re: 'windres' bug
To: cygwin AT sourceware DOT cygnus DOT com
Message-id: <01J839CX40TA000031@mail.rwth-aachen.de>
Organization: RWTH Aachen, PLT, D-52056 Aachen
MIME-version: 1.0
X-Mailer: Pegasus Mail for Win32 (v3.01a)
X-MIME-Autoconverted: from Quoted-printable to 8bit by delorie.com id LAA31400

>>> VS_VERSIONINFO structure created by 'windres' (B20.1)
>>> cannot be read by win9x (I don't know about nt).
>>> Stringtable sould have a 'total length' (first word),
>>> 'length of value' (second word) - missing (always set to 0),
>>> and 'type' (third word).
>>
>> I applied a patch for this from a net user just yesterday!  What a
>> coincidence.  I've attached a diff if you need it.

> Yes, indeed. It's big confusing coincidence.
> I have sent similar uuencoded patch to cygwin just before
> getting your message!

> Patches are similar but they are different!
> [ (*pp)->length vs (*pp)->length / 2]

> The question is: which one is the right one?

> In first version of my patch was this
> '(*pp)->length / 2'(number of UNICODE chars in string - should be
> right
> because based on Microsoft/Borland compilers output)
> But in second version is '(*pp)->length'
> (number of bytes used should be even more right considering a bug
> in microsoft based compilers - isn't very probabe?)

> And here comes more of confusing questions...

> In binary table (which is the same structure as stringtabe)
> second word seems to mean 'bytes used' not 'data items used',
> the same should be in string version.
> On the other hand, Microsoft (THE VERY GREAT AUTHOR)
> should exactly know what it stands for, so 'chars used'
> may be considered a perfect right one.
> Finaly, it doesn't matter since any non-zero value seems to work
> fine!

> Now You decide which version is the right version.

Well, you guessed right -- the '(*pp)->length / 2' version, which is 
my "solution" to the windres bug, is based on the Borland compiler's 
output... and it works on WINNT (I haven't tested it on WIN9x).

As long as you don't trust the Borland/Microsoft compiler's output, 
just use your '(*pp)->length' version and save the few nanoseconds my 
version would need for the devision by 2 ;-).

Regards,
Dirk
***********************************
* Dipl.-Ing. Dirk Meyer           *
* Lehrstuhl für Prozeßleittechnik *
* RWTH-Aachen                     *
* D-52056 Aachen                  *
* Tel.:   ++49 (241) 80-7709      *
* Fax:    ++49 (241) 8888-238     *
* E-Mail: dirk AT plt DOT rwth-aachen DOT de *
***********************************

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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