aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5/src/utils.hh
diff options
context:
space:
mode:
authortradke <schnetter@cct.lsu.edu>2008-01-23 15:23:00 +0000
committertradke <schnetter@cct.lsu.edu>2008-01-23 15:23:00 +0000
commit003cb6b186cbe441fc036b87d5b2330571b0ab69 (patch)
tree816a38b318849e9bf92612ebfc9a3f8f627148b1 /CarpetDev/CarpetIOF5/src/utils.hh
parenta762c9e673764fb377fa7d6ebfc16486a62a5a82 (diff)
CarpetIOF5: set compatibility macros to use the new HDF5 1.8 API
CarpetIOF5 uses functions from the new HDF5 API. Some macros need to be set in order to enable this new API also in HDF5 installations with HDF5 1.6.x backwards compatibility. darcs-hash:20080123152303-3fd61-cd1a81e9df48fbb370aa9fc205452737845ae727.gz
Diffstat (limited to 'CarpetDev/CarpetIOF5/src/utils.hh')
-rw-r--r--CarpetDev/CarpetIOF5/src/utils.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/CarpetDev/CarpetIOF5/src/utils.hh b/CarpetDev/CarpetIOF5/src/utils.hh
index c379cc775..ae7cb65a1 100644
--- a/CarpetDev/CarpetIOF5/src/utils.hh
+++ b/CarpetDev/CarpetIOF5/src/utils.hh
@@ -1,6 +1,24 @@
#ifndef UTILS_HH
#define UTILS_HH
+// force HDF5 1.8.x installations to use the new API
+#ifdef H5Gopen_vers
+#undef H5Gopen_vers
+#endif
+#ifdef H5Gcreate_vers
+#undef H5Gcreate_vers
+#endif
+#ifdef H5Acreate_vers
+#undef H5Acreate_vers
+#endif
+#ifdef H5Tarray_create_vers
+#undef H5Tarray_create_vers
+#endif
+#define H5Gopen_vers 2
+#define H5Gcreate_vers 2
+#define H5Acreate_vers 2
+#define H5Tarray_create_vers 2
+
#include <hdf5.h>
#include "cctk.h"