summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5Constants.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-09-17 15:30:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-09-17 15:30:04 (GMT)
commitadce9e7f4e9a743c4d48cf5fc7c52a13cc751be3 (patch)
tree6203020debef69ed802c3f51d66048bc8dd34182 /java/src/jni/h5Constants.c
parentf2760f6117c1abe3217d21794501ada228432284 (diff)
downloadhdf5-adce9e7f4e9a743c4d48cf5fc7c52a13cc751be3.zip
hdf5-adce9e7f4e9a743c4d48cf5fc7c52a13cc751be3.tar.gz
hdf5-adce9e7f4e9a743c4d48cf5fc7c52a13cc751be3.tar.bz2
HDFFV-10903 - fix VFD constants in JNI
Diffstat (limited to 'java/src/jni/h5Constants.c')
-rw-r--r--java/src/jni/h5Constants.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index ac55a13..9f52b3c 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -453,7 +453,13 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1DIRECT(JNIEnv *env, jclass cls) {
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1FAMILY(JNIEnv *env, jclass cls) { return H5FD_FAMILY; }
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5FD_1HDFS(JNIEnv *env, jclass cls) { return H5FD_HDFS; }
+Java_hdf_hdf5lib_HDF5Constants_H5FD_1HDFS(JNIEnv *env, jclass cls) {
+#ifdef H5_HAVE_LIBHDFS
+ return H5FD_HDFS;
+#else
+ return -1;
+#endif
+}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG(JNIEnv *env, jclass cls) { return H5FD_LOG; }
JNIEXPORT jlong JNICALL
@@ -463,7 +469,13 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1MULTI(JNIEnv *env, jclass cls) { return H5F
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1SEC2(JNIEnv *env, jclass cls) { return H5FD_SEC2; }
JNIEXPORT jlong JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5FD_1ROS3(JNIEnv *env, jclass cls) { return H5FD_ROS3; }
+Java_hdf_hdf5lib_HDF5Constants_H5FD_1ROS3(JNIEnv *env, jclass cls) {
+#ifdef H5_HAVE_ROS3_VFD
+ return H5FD_ROS3;
+#else
+ return -1;
+#endif
+}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1STDIO(JNIEnv *env, jclass cls) { return H5FD_STDIO; }
JNIEXPORT jlong JNICALL