On Thu, Jul 21, 2005 at 06:48:07PM -0600, Warren Young wrote:
> Chris Frey wrote:
> >I think this is a reasonable request.
> Easy to request, easy to implement...and a PITA on each release for the
> maintainer, whose vote apparently isn't worth much here. :(
Your vote definitely counts, since you're doing the work.
> I've counted them up, and this will make _seven_ places that have
> version numbers: ChangeLog, configure.in, mysql++.spec (2 places),
> lib/Makefile.am, lib/Doxyfile, and now lib/mysql++.h. Wanna bet that I
> never forget to update one of these before a release?
Would a script help with this? Perhaps convert some of these files to
filename.in so configure handles it, based on a single file in the root
> >#define MYSQLPP_LIB_VERSION 200 // version 2.0.x of the library
> If we're going to do this, let's at least use hexadecimal:
> #define MYSQLPP_LIB_VERSION 0x020000
> 1 byte per "part" of the version number.
> Why hex? It's a lot easier to parse:
> int major = (MYSQLPP_LIB_VERSION & 0xFF0000) >> 16;
> int minor = (MYSQLPP_LIB_VERSION & 0xFF00) >> 8;
> int bugfix = MYSQLPP_LIB_VERSION & 0xFF;
MUCH better! Thanks.
> versus the way the MySQL C API encodes it:
> int major = MYSQL_VERSION_ID / 10000;
> int minor = (MYSQL_VERSION_ID - (major * 10000)) / 100;
> int bugfix = MYSQL_VERSION_ID - (major * 10000) - (minor * 100);
> As I said, easy to implement. But that's not the problem.
I should automate this for you, since I suggested it. :-)