diff --git a/src/H5public.h b/src/H5public.h index 1f835f7dff..0a3b072f87 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -83,6 +83,17 @@ extern "C" { #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) +/* macros for comparing the version */ +#define H5_VERSION_GE(Maj,Min,Rel) \ + (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE>=Rel)) || \ + ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR>Min)) || \ + (H5_VERS_MAJOR>Maj)) + +#define H5_VERSION_LE(Maj,Min,Rel) \ + (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE<=Rel)) || \ + ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR