diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-03-17 16:30:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-17 16:30:22 +0100 |
| commit | 979e3a3ba0b270f7401a57105411375bb99ddbb5 (patch) | |
| tree | e0acbd420c2a52a8aa8f563aaef88dded51edfaa /src | |
| parent | ee19a2d4d3241f2d44968a67bf4a6e425e38d84a (diff) | |
| parent | b37d7a72ee322c19e881728fc1e1ba25635b1c4a (diff) | |
| download | PROJ-979e3a3ba0b270f7401a57105411375bb99ddbb5.tar.gz PROJ-979e3a3ba0b270f7401a57105411375bb99ddbb5.zip | |
Merge pull request #2581 from rouault/proj_version_number
proj.h: add PROJ_COMPUTE_VERSION, PROJ_VERSION_NUMBER, PROJ_AT_LEAST_VERSION macros
Diffstat (limited to 'src')
| -rw-r--r-- | src/proj.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -174,6 +174,18 @@ extern "C" { #define PROJ_VERSION_MINOR 1 #define PROJ_VERSION_PATCH 0 +/* Note: the following 3 defines have been introduced in PROJ 8.0.1 */ +/* Macro to compute a PROJ version number from its components */ +#define PROJ_COMPUTE_VERSION(maj,min,patch) ((maj)*10000+(min)*100+(patch)) + +/* Current PROJ version from the above version numbers */ +#define PROJ_VERSION_NUMBER \ + PROJ_COMPUTE_VERSION(PROJ_VERSION_MAJOR, PROJ_VERSION_MINOR, PROJ_VERSION_PATCH) + +/* Macro that returns true if the current PROJ version is at least the version specified by (maj,min,patch) */ +#define PROJ_AT_LEAST_VERSION(maj,min,patch) \ + (PROJ_VERSION_NUMBER >= PROJ_COMPUTE_VERSION(maj,min,patch)) + extern char const PROJ_DLL pj_release[]; /* global release id string */ /* first forward declare everything needed */ |
