summaryrefslogtreecommitdiffstats
path: root/src/H5Fpublic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fpublic.h')
-rw-r--r--src/H5Fpublic.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index aa6cc2a..122f711 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -32,6 +32,14 @@
#define H5CHECK
#endif /* _H5private_H */
+/* When this header is included from a private HDF5 header, don't make calls to H5open() */
+#undef H5OPEN
+#ifndef _H5private_H
+#define H5OPEN H5open(),
+#else /* _H5private_H */
+#define H5OPEN
+#endif /* _H5private_H */
+
/*
* These are the bits that can be passed to the `flags' argument of
* H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine
@@ -44,16 +52,16 @@
* Note that H5F_ACC_DEBUG is deprecated (nonfuncational) but retained as a
* symbol for backward compatibility.
*/
-#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */
-#define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */
-#define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */
-#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists*/
+#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */
+#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */
+#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */
+#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/
/* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */
-#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */
+#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */
/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
* parent file. */
-#define H5F_ACC_DEFAULT (H5CHECK 0xffffu) /*ignore setting on lapl */
+#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */
/* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
#define H5F_OBJ_FILE (0x0001u) /* File objects */
@@ -223,7 +231,7 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Macros */
-#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (deprecated)*/
+#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/
/* Typedefs */