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 the current release is backwards-compatible with.
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 library used when compiling and linking the program, i. e. when it is (about to be) run. The API version *is* useful for the C program and its compiler to know, so it knows which features are available. In contrast to the ABI version, this information is used at compile time. By all means, introduce version testing macros/defines, such as: #define LIBDBI_MAJOR 0 #define LIBDBI_MINOR 8 #define LIBDBI_PATCH 3 #define LIBDBI_VERSION ((1000000 * LIBDBI_MAJOR) \ + (1000 * LIBDBI_MINOR) \ + LIBDBI_PATCH) Andreas' code could then do something like: #if defined(LIBDBI_VERSION) && (LIBDBI_VERSION >= 8003) use_new_feature (); #else use_own_implementation (); #endif But mis-using the ABI version numbers for this purpose is evil, Evil, EVIL! Unfortunately I don't have a good link at hand which explains the issue in detail, so I'll have to back up my claims with the last paragraph on this page of the libtool manual: <http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html> Hope this clears things up and I especially hope I didn't misunderstand you all along and told you something you already were aware of ;) Regards, -octo -- Florian octo Forster Hacker in training GnuPG: 0x91523C3D http://verplant.org/
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________ libdbi-devel mailing list libdbi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-devel