summaryrefslogtreecommitdiffstats
path: root/src/H5public.h
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-03-03 14:50:04 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-03-03 14:50:04 (GMT)
commit070556eca7943dd090e3b11f79382cc76a466646 (patch)
treea2b8e9ba9d3c717bcef9e8c5bcd8bcdc32b51ec8 /src/H5public.h
parent28c7a0e0ea9851debd78d3cf289759f7f0d5b506 (diff)
downloadhdf5-070556eca7943dd090e3b11f79382cc76a466646.zip
hdf5-070556eca7943dd090e3b11f79382cc76a466646.tar.gz
hdf5-070556eca7943dd090e3b11f79382cc76a466646.tar.bz2
[svn-r20181] Bug 2115/605 - I added 2 public macros to the H5public.h - H5_VERSION_GE and H5_VERSION_LE - and put some test cases in tfile.c.
Tested on jam - simple change. I did h5committest on the same change for the trunk.
Diffstat (limited to 'src/H5public.h')
-rw-r--r--src/H5public.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5public.h b/src/H5public.h
index cdbd11d..c0ace3f 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<Min)) || \
+ (H5_VERS_MAJOR<Maj))
+
/*
* Status return values. Failed integer functions in HDF5 result almost
* always in a negative value (unsigned failing functions sometimes return