Re: [libdbi-devel] Library version macro

2009-03-30 Thread Markus Hoenicka
Quoting Balazs Scheidler : > I use it this way (as a user of libdbi): > > PKG_CHECK_MODULES(LIBDBI, dbi >= $LIBDBI_MIN_VERSION,, LIBDBI_LIBS="") > > Do you have a more exact problem that I might be able to explain? > No thanks, this is about all I needed to know. I just never got round to look

Re: [libdbi-devel] Library version macro

2009-03-29 Thread Balazs Scheidler
On Tue, 2009-03-17 at 17:48 +0100, Markus Hoenicka wrote: > Quoting Andreas Ericsson : > > >> Why not just use pkg-config and install a .pc file? Or am I missing > >> something? > >> > > > > What you're missing is that no compiler in the world will ever look at > > a .pc file, and the information

Re: [libdbi-devel] Library version macro

2009-03-21 Thread Markus Hoenicka
Markus Hoenicka writes: > > #define LIBDBI_VERSION ((MAJOR * 1) + (MINOR * 100) + (REVISION)) [...] > >> major = current - age > >> minor = age + 8 > >> patch = revision > >> I've checked in updated versions of configure.in and include/dbi/dbi.h.in that implement a version numbering schem

Re: [libdbi-devel] Library version macro

2009-03-19 Thread Markus Hoenicka
Hi, Quoting Andreas Ericsson : > Sure, but please add a LIBDBI_VERSION macro as well, or people > will start tweaking them in themselves, which will cause headache > for you if you want to add one later. > > #define LIBDBI_VERSION ((MAJOR * 1) + (MINOR * 100) + (REVISION)) > > should do it. >

Re: [libdbi-devel] Library version macro

2009-03-19 Thread Andreas Ericsson
Markus Hoenicka wrote: > Hi, > > Florian Forster writes: > > What Andreas is discussing is, as far as I see, the versioning schema > > used by the GNU linker. Markus is talking about the libtool versioning > > system. Unfortunately, that's not the same thing. > > Well analyzed. I should have p

Re: [libdbi-devel] Library version macro

2009-03-19 Thread Andreas Ericsson
Florian Forster wrote: > Hi again, > > On Tue, Mar 17, 2009 at 05:09:15PM +0100, Markus Hoenicka wrote: >> I'm not going to do that, as discussed before on this list. In brief, >> we forgot to update the libtool interface version info in the past. In >> the worst case your suggestion will cause us

Re: [libdbi-devel] Library version macro

2009-03-19 Thread Florian Forster
Good morning, On Thu, Mar 19, 2009 at 01:06:48AM +0100, Markus Hoenicka wrote: > major = current - age > minor = age > patch = revision > > If that serves everyone's needs, I'll be happy to use this. it got my vote :) > However, 0.1.0 is not an obvious successor for 0.8.3. So, should we > use:

Re: [libdbi-devel] Library version macro

2009-03-18 Thread Markus Hoenicka
Hi, Florian Forster writes: > What Andreas is discussing is, as far as I see, the versioning schema > used by the GNU linker. Markus is talking about the libtool versioning > system. Unfortunately, that's not the same thing. Well analyzed. I should have pointed out upfront that libdbi uses lib

Re: [libdbi-devel] Library version macro

2009-03-18 Thread Florian Forster
Hi again, On Tue, Mar 17, 2009 at 05:09:15PM +0100, Markus Hoenicka wrote: > I'm not going to do that, as discussed before on this list. In brief, > we forgot to update the libtool interface version info in the past. In > the worst case your suggestion will cause us to forget to uptate the > inter

Re: [libdbi-devel] Library version macro

2009-03-18 Thread Markus Hoenicka
Hi, Quoting Florian Forster : > > It'll work, in the sense of ``people will find a way to calculate what > they really need from these numbers'', but is that really necessary? > Just to prove a point? I'm a bit tied up right now, so I'll attend to the details later. Just to let you know that it

Re: [libdbi-devel] Library version macro

2009-03-18 Thread Andreas Ericsson
Markus Hoenicka wrote: > Hi, > > Andreas Ericsson writes: > > If you add functions to the library, it will remain LINK compatible > > with applications compiled against older versions of the library (so > > the ABI-version must not be changed), but programmers who wish to utilize > > I don't u

Re: [libdbi-devel] Library version macro

2009-03-18 Thread Florian Forster
Hi, I have the feeling you're talking at cross purposes here. On Wed, Mar 18, 2009 at 12:14:27AM +0100, Markus Hoenicka wrote: > Andreas Ericsson writes: > > If you add functions to the library, it will remain LINK compatible > > with applications compiled against older versions of the library

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Markus Hoenicka
Hi, Andreas Ericsson writes: > If you add functions to the library, it will remain LINK compatible > with applications compiled against older versions of the library (so > the ABI-version must not be changed), but programmers who wish to utilize I don't understand libtool's interface definitio

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Peter O'Gorman
Andreas Ericsson wrote: >> So, to sum it up: >> >> Next release, called "1.0": >> LIBDBI_LIB_CURRENT 1 >> LIBDBI_LIB_REVISION 0 >> LIBDBI_LIB_AGE 1 >> >> If we fix some bugs in that release, we'll have "1.1": >> >> LIBDBI_LIB_CURRENT 1 >> LIBDBI_LIB_REVISION 1 >> LIBDBI_LIB_AGE 1 >> >> If we add f

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Andreas Ericsson
Markus Hoenicka wrote: > > Quoting Florian Forster : > > >> By all means, introduce version testing macros/defines, such as: >> #define LIBDBI_MAJOR 0 >> #define LIBDBI_MINOR 8 >> #define LIBDBI_PATCH 3 > > I'm not going to do that, as discussed before on this list. In brief, > we forgot t

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Markus Hoenicka
Quoting Andreas Ericsson : >> Why not just use pkg-config and install a .pc file? Or am I missing >> something? >> > > What you're missing is that no compiler in the world will ever look at > a .pc file, and the information should be available inside the library > headers to be of any use. > Besi

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Andreas Ericsson
Peter O'Gorman wrote: > Markus Hoenicka wrote: >> Hi there, > >>> #define LIBDBI_VERSION ((100 * LIBDBI_MAJOR) \ >>> + (1000 * LIBDBI_MINOR) \ >>> + LIBDBI_PATCH) >>> >> I'll be happy to do something along these lines, based on the version

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Peter O'Gorman
Markus Hoenicka wrote: > Hi there, >> #define LIBDBI_VERSION ((100 * LIBDBI_MAJOR) \ >> + (1000 * LIBDBI_MINOR) \ >> + LIBDBI_PATCH) >> > > I'll be happy to do something along these lines, based on the version > numbers that we have. >

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Markus Hoenicka
Hi there, Quoting Florian Forster : > I think you're making the (common) mistake to confuse API and ABI > versions. It is not useful for a C program (or its compiler) to know the > ABI version. It's used by the linker to figure out if an installed > version of the library is compatible with the l

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Florian Forster
Hi, On Tue, Mar 17, 2009 at 03:13:53PM +0100, Markus Hoenicka wrote: > They do, but in a reasonable way. LIB_CURRENT is the API version > number proper. LIB_REVISION numbers the revisions that do not change > the API (what you call "micro-releases"). LIB_AGE indicates how many > version numbers th

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Andreas Ericsson
Florian Forster wrote: > Hi, > > On Tue, Mar 17, 2009 at 03:13:53PM +0100, Markus Hoenicka wrote: >> They do, but in a reasonable way. LIB_CURRENT is the API version >> number proper. LIB_REVISION numbers the revisions that do not change >> the API (what you call "micro-releases"). LIB_AGE indicat

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Markus Hoenicka
Quoting Andreas Ericsson : >> LIB_{CURRENT,REVISION,AGE} for quite a while. > > But aren't those determining the .so-version as well? If so, it wouldn't > be correct to update them with micro-releases, since the linker would > believe a later version is incompatible with an earlier one. > They do

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Andreas Ericsson
Markus Hoenicka wrote: > Hi, > Hi. Thanks for the quick reply :) > Quoting Andreas Ericsson : > >> My dev-box uses libdbi 0.8.3, but the build-box uses 0.8.1. Some >> functions I'd like to use (dbi_conn_escape_string_copy() among >> others) are in 0.8.3, but not in 0.8.2. I suppose I could conv

Re: [libdbi-devel] Library version macro

2009-03-17 Thread Markus Hoenicka
Hi, Quoting Andreas Ericsson : > My dev-box uses libdbi 0.8.3, but the build-box uses 0.8.1. Some > functions I'd like to use (dbi_conn_escape_string_copy() among > others) are in 0.8.3, but not in 0.8.2. I suppose I could convert > all the queries to use dbi_conn_quote_string_copy() instead, but