summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-10-22 15:59:07 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-10-22 15:59:07 (GMT)
commit8a12b57483854929dd9ccbcf107dd1051c6c3a12 (patch)
tree0eed4b85b7088b8c4e357804802627ff61fdc887
parent5f99891e6dc59524fb6e43ca96a86df22b403c61 (diff)
parentb33a2e7dfe76a2947c12462adb40c88af9c92e75 (diff)
downloadhdf5-8a12b57483854929dd9ccbcf107dd1051c6c3a12.zip
hdf5-8a12b57483854929dd9ccbcf107dd1051c6c3a12.tar.gz
hdf5-8a12b57483854929dd9ccbcf107dd1051c6c3a12.tar.bz2
Merge pull request #1300 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:vol_tweaks to develop
* commit 'b33a2e7dfe76a2947c12462adb40c88af9c92e75': Fixed warnings in the VOL example and run it from the script. Split H5VLnative.h into public and private files and updated
-rw-r--r--MANIFEST1
-rw-r--r--examples/h5_vol_external_log_native.c16
-rw-r--r--examples/run-c-ex.sh.in4
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/H5Aint.c2
-rw-r--r--src/H5Dint.c2
-rw-r--r--src/H5Dvirtual.c2
-rw-r--r--src/H5Fint.c3
-rw-r--r--src/H5Gint.c2
-rw-r--r--src/H5Gtraverse.c2
-rw-r--r--src/H5L.c2
-rw-r--r--src/H5Lexternal.c2
-rw-r--r--src/H5Oint.c2
-rw-r--r--src/H5Pfapl.c2
-rw-r--r--src/H5VLnative.c2
-rw-r--r--src/H5VLnative.h8
-rw-r--r--src/H5VLnative_private.h40
-rw-r--r--src/hdf5.h3
-rw-r--r--test/vol.c2
19 files changed, 68 insertions, 30 deletions
diff --git a/MANIFEST b/MANIFEST
index 2ca6110..a7df90c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -893,6 +893,7 @@
./src/H5VLmodule.h
./src/H5VLnative.c
./src/H5VLnative.h
+./src/H5VLnative_private.h
./src/H5VLpkg.h
./src/H5VLprivate.h
./src/H5VLpublic.h
diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c
index a25be6d..d6e44db 100644
--- a/examples/h5_vol_external_log_native.c
+++ b/examples/h5_vol_external_log_native.c
@@ -131,7 +131,7 @@ visit_cb(hid_t oid, const char *name,
if(H5Iget_type(oid) == H5I_GROUP) {
len = H5VLget_driver_name(oid, n, 50);
- printf ("Visiting GROUP VOL name = %s %d\n", n, len);
+ printf ("Visiting GROUP VOL name = %s %zd\n", n, len);
}
if(H5Iget_type(oid) == H5I_DATASET)
printf("visiting dataset\n");
@@ -184,29 +184,29 @@ int main(int argc, char **argv) {
file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
len = H5VLget_driver_name(file_id, name, 25);
- printf ("FILE VOL name = %s %d\n", name, len);
+ printf ("FILE VOL name = %s %zd\n", name, len);
group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
len = H5VLget_driver_name(group_id, name, 50);
- printf ("GROUP VOL name = %s %d\n", name, len);
+ printf ("GROUP VOL name = %s %zd\n", name, len);
int_id = H5Tcopy(H5T_NATIVE_INT);
H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
len = H5VLget_driver_name(int_id, name, 50);
- printf ("DT COMMIT name = %s %d\n", name, len);
+ printf ("DT COMMIT name = %s %zd\n", name, len);
H5Tclose(int_id);
int_id = H5Topen2(file_id, "int", H5P_DEFAULT);
len = H5VLget_driver_name(int_id, name, 50);
- printf ("DT OPEN name = %s %d\n", name, len);
+ printf ("DT OPEN name = %s %zd\n", name, len);
H5Tclose(int_id);
int_id = H5Oopen(file_id,"int",H5P_DEFAULT);
len = H5VLget_driver_name(int_id, name, 50);
- printf ("DT OOPEN name = %s %d\n", name, len);
+ printf ("DT OOPEN name = %s %zd\n", name, len);
len = H5Fget_name(file_id, name, 50);
- printf("name = %d %s\n", len, name);
+ printf("name = %zd %s\n", len, name);
data = malloc (sizeof(int)*nelem);
for(i=0;i<nelem;++i)
@@ -221,7 +221,7 @@ int main(int argc, char **argv) {
H5Sclose(dataspaceId);
len = H5VLget_driver_name(datasetId, name, 50);
- printf ("DSET name = %s %d\n", name, len);
+ printf ("DSET name = %s %zd\n", name, len);
H5Dwrite(datasetId, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
H5Dclose(datasetId);
diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in
index 209cdd7..6ff2e9a 100644
--- a/examples/run-c-ex.sh.in
+++ b/examples/run-c-ex.sh.in
@@ -139,7 +139,9 @@ then
RunTest h5_vds-percival-unlim-maxmin&&\
rm h5_vds-percival-unlim-maxmin &&\
RunTest h5_vds &&\
- rm h5_vds); then
+ rm h5_vds &&\
+ RunTest h5_vol_external_log_native &&\
+ rm h5_vol_external_log_native); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5104019..f82b8de 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -835,6 +835,7 @@ set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5STprivate.h
${HDF5_SRC_DIR}/H5Tprivate.h
${HDF5_SRC_DIR}/H5TSprivate.h
+ ${HDF5_SRC_DIR}/H5VLnative_private.h
${HDF5_SRC_DIR}/H5VLprivate.h
${HDF5_SRC_DIR}/H5VMprivate.h
${HDF5_SRC_DIR}/H5WBprivate.h
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 80a3e98..ca5cb80 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -43,7 +43,7 @@
#include "H5Opkg.h" /* Object headers */
#include "H5SMprivate.h" /* Shared Object Header Messages */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VLnative.h" /* Native VOL driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 3436105..253d005 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -31,7 +31,7 @@
#include "H5Lprivate.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VLnative.h" /* Native VOL driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 77047e9..c7c1eec 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -58,7 +58,7 @@
#include "H5Oprivate.h" /* Object headers */
#include "H5Pprivate.h" /* Property Lists */
#include "H5Sprivate.h" /* Dataspaces */
-#include "H5VLnative.h" /* Native VOL driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
#include "H5VLprivate.h" /* Virtual Object Layer */
/****************/
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 6a57ca5..1a0c8b9 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -38,8 +38,7 @@
#include "H5SMprivate.h" /* Shared Object Header Messages */
#include "H5Tprivate.h" /* Datatypes */
#include "H5VLprivate.h" /* VOL drivers */
-
-#include "H5VLnative.h" /* Native VOL driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 88ef82b..26c582e 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -39,7 +39,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
-#include "H5VLnative.h" /* Virtual Object Layer (native) */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index a103f53..8fefcd8 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -43,7 +43,7 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Ppublic.h" /* Property Lists */
#include "H5WBprivate.h" /* Wrapped Buffers */
-#include "H5VLnative.h" /* Virtual Object Layer (native) */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5L.c b/src/H5L.c
index 0beafba..5142c82 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -34,7 +34,7 @@
#include "H5Oprivate.h" /* File objects */
#include "H5Pprivate.h" /* Property lists */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VLnative.h" /* Virtual Object Layer (native) */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index d9cc7a3..34c96a8 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -34,7 +34,7 @@
#include "H5Opublic.h" /* File objects */
#include "H5Pprivate.h" /* Property lists */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VLnative.h" /* Native VOL Driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Oint.c b/src/H5Oint.c
index c569226..30fe127 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -43,7 +43,7 @@
#endif /* H5O_ENABLE_BOGUS */
#include "H5Opkg.h" /* Object headers */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VLnative.h" /* Virtual Object Layer (native) */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 0340b67..a50c5ee 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -49,7 +49,7 @@
#endif
/* Includes needed to set the default VOL driver */
-#include "H5VLnative.h" /* Native HDF5 file VOL driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
/****************/
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index acd56cd..e71e08e 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -41,7 +41,7 @@
#include "H5SMprivate.h" /* Shared Object Header Messages */
#include "H5Tpkg.h" /* Datatypes */
#include "H5VLprivate.h" /* VOL drivers */
-#include "H5VLnative.h" /* Native VOL driver */
+#include "H5VLnative_private.h" /* Native VOL driver */
/*
* The VOL driver identification number.
diff --git a/src/H5VLnative.h b/src/H5VLnative.h
index 19b9ff9..832c758 100644
--- a/src/H5VLnative.h
+++ b/src/H5VLnative.h
@@ -17,9 +17,6 @@
#ifndef _H5VLnative_H
#define _H5VLnative_H
-/* Initializer function for native VOL driver */
-#define H5VL_NATIVE (H5VL_native_init())
-
/* Characteristics of the native VOL driver */
#define H5VL_NATIVE_NAME "native"
#define H5VL_NATIVE_VALUE H5_VOL_NATIVE /* enum value */
@@ -30,12 +27,7 @@
extern "C" {
#endif
-/* XXX (VOL_MERGE): Poor separation of public and private functionality here */
H5_DLL herr_t H5Pset_fapl_native(hid_t fapl_id);
-H5_DLL hid_t H5VL_native_get_driver_id(void);
-H5_DLL hid_t H5VL_native_init(void);
-H5_DLL hid_t H5VL_native_register(H5I_type_t type, const void *obj, hbool_t app_ref);
-H5_DLL herr_t H5VL_native_unregister(hid_t obj_id);
#ifdef __cplusplus
}
diff --git a/src/H5VLnative_private.h b/src/H5VLnative_private.h
new file mode 100644
index 0000000..79a6e1c
--- /dev/null
+++ b/src/H5VLnative_private.h
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: The private header file for the native VOL driver.
+ */
+
+#ifndef _H5VLnative_private_H
+#define _H5VLnative_private_H
+
+/* Include driver's public header */
+#include "H5VLnative.h"
+
+/* Initializer function for native VOL driver */
+#define H5VL_NATIVE (H5VL_native_init())
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+H5_DLL hid_t H5VL_native_get_driver_id(void);
+H5_DLL hid_t H5VL_native_init(void);
+H5_DLL hid_t H5VL_native_register(H5I_type_t type, const void *obj, hbool_t app_ref);
+H5_DLL herr_t H5VL_native_unregister(hid_t obj_id);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H5VLnative_private_H */
diff --git a/src/hdf5.h b/src/hdf5.h
index fbeae83..f19abd9 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -52,4 +52,7 @@
#include "H5FDwindows.h" /* Win32 I/O */
#endif
+/* Virtual object layer drivers */
+#include "H5VLnative.h" /* Native VOL driver */
+
#endif
diff --git a/test/vol.c b/test/vol.c
index ad65a62..0ef84c5 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -19,7 +19,7 @@
*/
#include "h5test.h"
-#include "H5VLnative.h"
+#include "H5VLnative_private.h"
#define NATIVE_VOL_TEST_FILENAME "native_vol_test"