[gdal-dev] Which version number for the next GDAL release : 1.10 or 2.0 ?

Even Rouault even.rouault at mines-paris.org
Thu Nov 8 13:49:51 PST 2012


> I appologise to Howard or others who have been tuning configuration logic
> for a 2.0 release.

It depends on how they have tuned...

We have a small technical detail to solve with 1.10 because of
#  define GDAL_VERSION_NUM      
(GDAL_VERSION_MAJOR*1000+GDAL_VERSION_MINOR*100+GDAL_VERSION_REV*10+GDAL_VERSION_BUILD)

With the current definition 1.10 and 2.0 would resolve to 2000... Annoying.

So we would need to redefine it likely as 

#  define GDAL_VERSION_NUM      
(GDAL_VERSION_MAJOR*1000000+GDAL_VERSION_MINOR*10000+GDAL_VERSION_REV*100+GDAL_VERSION_BUILD)

and 1.10 would then be 1100000 which is still greater than 2000 ...

So if people have already tested GDAL_VERSION_NUM >= 2000, this would still 
work...

~~~~~~~~~~~~~~~

I'm also wondering if we shouldn't introduce a macro to compute the version 
number, like
#define GDAL_COMPUTE_VERSION(maj,min,rev, build) 
(maj*1000000+min*10000+rev*100+build)

so that tests can be written more naturally (the new version number would have 
too many zeros, that I bet most people would likely go wrong) :

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(1,10,0,0)
// foo
#endif

Annoyingly, as this macro would be new, user code should use it conditionally 
:

#if defined(GDAL_COMPUTE_VERSION)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(1,10,0,0)
// foo
#endif
#endif

> 
> Best regards,


More information about the gdal-dev mailing list