Markus Hoenicka wrote: > Hi, > Hi. Thanks for the quick reply :)
> Quoting Andreas Ericsson <a...@op5.se>: > >> 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 >> since it's not performance critical I've decided to write a small >> wrapper and remove the quotation marks instead (there are rather >> a lot of queries). >> >> This shouldn't be much of a problem, but I can't seem to find >> any versioning macro telling me what version of the library I'm >> currently building against. The LIBDBI_LIB_{CURRENT,REVISION,AGE} >> macros are useless for this, since the ABI hasn't changed, and >> thus the .so-version remains the same, and new functionality >> added in a backwards compatible way (the preferred way, one would >> think) won't bump it either, which means that new functionality >> really can't be used portably until the ABI breaks, which sucks >> quite tremenduously. >> > > This is one of the dusty corners in libdbi (and I know it sucks). No > one, myself included, proved wise enough to update the > 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. The best trick is probably to utilize the vcs versioning numbers and use a script to cut releases. Sadly, I have no idea how to make that work in cvs, although I could do it blindfolded in git, hint hint ;-) > This problem was noticed a > year ago, and release 1.0 will be the first one which has this > information correct again. From that release on you'll be able to use > these constants with all their benefits. > Sounds awesome, but I'd still invite you to give some serious thought to having it be updated automagically when you cut a release. Any manual labour is bound to go stale sooner or later. > For the time being you'd have to write configure tests which look for > the functions that you want to call. For libdbi releases up to 0.8.3 > this is the only reliable way to test for the presence of these > functions. Let me know if you need further assistance. > Ugh. That's more complexity than it's worth. I've just hacked around it using a wrapper for dbi_conn_quote_string_copy() atm. It suffices for my needs. Thanks for the tip though. I'll look into it if I run into anything I can't work around in some other way. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. ------------------------------------------------------------------------------ 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