Skip to content

Commit

Permalink
shapefil.h: add SHAPELIB_VERSION_MAJOR/MINOR/MICRO, SHAPELIB_VERSION_…
Browse files Browse the repository at this point in the history
…NUMBER, and SHAPELIB_AT_LEAST macros
  • Loading branch information
rouault committed Dec 20, 2023
1 parent 31f33f8 commit 3b6e08d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions shapefil.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ extern "C"
{
#endif

/************************************************************************/
/* Version related macros (added in 1.6.0) */
/************************************************************************/

#define SHAPELIB_VERSION_MAJOR 1
#define SHAPELIB_VERSION_MINOR 6
#define SHAPELIB_VERSION_MICRO 0

#define SHAPELIB_MAKE_VERSION_NUMBER(major, minor, micro) \
((major) * 10000 + (minor) * 100 + (micro))

#define SHAPELIB_VERSION_NUMBER \
SHAPELIB_MAKE_VERSION_NUMBER(SHAPELIB_VERSION_MAJOR, SHAPELIB_VERSION_MINOR, SHAPELIB_VERSION_MICRO)

#define SHAPELIB_AT_LEAST(major, minor, micro) \
(SHAPELIB_VERSION_NUMBER >= SHAPELIB_MAKE_VERSION_NUMBER(major, minor, micro))

/************************************************************************/
/* Configuration options. */
/************************************************************************/
Expand Down

0 comments on commit 3b6e08d

Please sign in to comment.