libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve versioning algorithm description


From: Charles Wilson
Subject: Re: Improve versioning algorithm description
Date: Wed, 23 Sep 2009 01:36:28 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

Bob Friesenhahn wrote:
> On Wed, 23 Sep 2009, Ralf Wildenhues wrote:
>>
>> The most important question is whether it is correct, not only for
>> Linux.  That's what I'm not yet certain about.
> 
> Something tells me that it is not correct for Windows. 

Ralf's description is correct also for Windows.

> Under Windows I
> see a lack of versioning and libtool adds a simple number like
> name-7.dll to the name.  Not all OSs support library versioning, so in
> that case applications would continue using the older library and
> freshly compiled applications would use the newer library.

Thru the magic of 'c-a', on windows we can represent one dimensional
compatibility (that is, backwards compatibility) with a single number.
That is:

old app <--> old dll, ok.
old app <--> new "compatible" dll, ok
new app <--> new "compatible" dll, ok
new app <--> old dll, maybe ok, maybe not.

The old dll may not be "forward compatible" with new applications, even
though the new dll is "backwards compatible" with old applications, and
thus both DLLs have the same single number.

>From Ralf's three cases:
case 1) no API change at all, c and a do not change -- DLL is forward-
and backward- compatible, and 'c-a' remains constant so DLL name doesn't
change.  This is correct behavior.

case 2) API additions only. DLL is backwards-compatible, but not
forward-compatible. Both c and a are incremented, so 'c-a' does not
change, and DLL name doesn't change. This is correct behavior.

case 3) API deletions or modifications. DLL is not compatible. c in
incremented, and a is set to 0. No matter how you slice it, 'c-a' will
change -- and the DLL name will change with it.  This is correct behavior.


See this page for a good example:
http://home.att.net/~perlspinr/libversioning.html

--
Chuck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]