Subject: Re: libssh2 master c46abb2 Use the new libssh2.rc file.

Re: libssh2 master c46abb2 Use the new libssh2.rc file.

From: Guenter <lists_at_gknw.net>
Date: Fri, 20 Aug 2010 00:42:30 +0200

Am 19.08.2010 23:06, schrieb Peter Stuge:
> Peter Stuge wrote:
>>>> Why do you add the extra \0 in these strings?
>>>
>>> no idea - everyone does; seen in all .rc files so far.
>
> Check wine..
I check nothing - I have only blindly copied over the resource file from
libcurl and adapted for libssh2; I do not care if there are some
trailing \0 or not. They are in libcurl.rc, in cares.rc, in a couple of
other OpenSource projects (see below), and now they are with libssh2.rc.

Other project's resource files where I see these trailing \0:
Apache libapr:
http://svn.apache.org/viewvc/apr/apr/trunk/libapr.rc?revision=983403&view=markup
Apache httpd:
http://svn.apache.org/viewvc/httpd/httpd/trunk/build/win32/httpd.rc?revision=421084&view=markup
Subversion:
http://svn.apache.org/viewvc/subversion/trunk/build/win32/svn.rc?revision=889565&view=markup
PHP:
http://svn.php.net/viewvc/php/php-src/trunk/win32/php5dllts.rc2?revision=298702&view=markup

With a quick googling I found M$ suggests them here:
http://msdn.microsoft.com/en-us/library/aa381058%28v=VS.85%29.aspx
look for:
#define VER_FILEVERSION_STR "3.10.349.0\0"
#define VER_PRODUCTVERSION_STR "3.10\0"

>> In my experience they are not needed.
I really wonder what you care at all about few trailing \0 which might
or might not be required. But if you care that much for these then I
suggest this:
compile a helloworld.c with a helloworld.rc without \0, and
compile this with MSVC6, MSVC9, MingW32, Watcom, Borland, LCC and their
shipping resource compiler. Then check if all these 6 binary results
display the version info from the .rc file correctly on W2000, WXP,
Vista, W7. If this is true then go and remove them.
I though have not the time nor all compilers handy to check this, sorry.

BTW. there are also resource editors available which might rely on these
extra \0, who knows ...

And finally: dont get me wrong - I wondered about these also when I saw
them first time, and I'm in doubt too if they are needed, just like you
... -- but other than you I dont care about because its not worth to
proof it :) :)

Gün.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-08-20