Added MS_VERSION_NUM to mapserver.h to make it easier to detect changes
From email exchanged on dev list:
You could look at the way the Apache version string is parsed in MapServer's
configure.in.
To mkae this simpler in the future, perhaps it's time to add MS_VERSION_NUM to
mapserver.h similar to what we have in GDAL, e.g.
#ifndef MS_VERSION_MAJOR
# define MS_VERSION_MAJOR 5
# define MS_VERSION_MINOR 2
# define MS_VERSION_REV 0
#endif
#ifndef MS_VERSION_NUM
# define MS_VERSION_NUM (MS_VERSION_MAJOR*10000+MS_VERSION_MINOR*100+MS_VERSION_REV)
#endif
Then your code could use
#if MS_VERSION_NUM >= 50200
If you file a ticket and there are no objections then I'll add this. We could also backport to 5.2.1 to make this useful immediately.
Daniel
Change History
(4)
Owner: |
changed from sdlime to dmorissette
|
Status: |
new → assigned
|
Milestone: |
5.2.1 release → 5.4 release
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Description: |
modified (diff)
|
MS_VERSION_NUM added in SVN trunk r7875.
In addition to the new defines, changes were also required in the configure script and Makefiles which were doing grep's on the mapserver.h files and had their tests broken by the new defines. I also updated msGetVersionInt() to just return MS_VERSION_NUM instead of parsing MS_VERSION as it used to do.
I will NOT backport to 5.2.x... there are too many changes.