summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-13 18:03:24 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-13 18:03:24 (GMT)
commitbc288cb5b0a9cd110306898e7d5062466d050069 (patch)
tree84eb71edfe5ff4bfeca19abac8660498b51958c2
parent8bca58a0d8efc56d5e45c5ca5e8f2a255882bed4 (diff)
downloadhdf5-bc288cb5b0a9cd110306898e7d5062466d050069.zip
hdf5-bc288cb5b0a9cd110306898e7d5062466d050069.tar.gz
hdf5-bc288cb5b0a9cd110306898e7d5062466d050069.tar.bz2
Correct compile and test Windows errors
-rw-r--r--config/cmake/jrunTest.cmake8
-rw-r--r--config/cmake_ext_mod/grepTest.cmake4
-rw-r--r--config/cmake_ext_mod/runTest.cmake8
-rw-r--r--tools/lib/h5tools_dump.c9
4 files changed, 19 insertions, 10 deletions
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index e736b7a..ee4517c 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -126,7 +126,9 @@ if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
- file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ endif ()
#file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
#file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
@@ -190,7 +192,9 @@ if (NOT TEST_SKIP_COMPARE)
if (TEST_ERRREF)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
- file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ endif ()
#file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
#file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
endif ()
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index 78ee0da..a6f1c7f 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -100,7 +100,9 @@ if (TEST_ERRREF)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
- file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ endif ()
#file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
#file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 6f633f3..0c4a5a0 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -207,7 +207,9 @@ if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
- file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ endif ()
#file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
#file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
@@ -271,7 +273,9 @@ if (NOT TEST_SKIP_COMPARE)
if (TEST_ERRREF)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
- file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ endif ()
#file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
#file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
endif ()
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 4a18785..2d20f53 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -3983,6 +3983,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tool_format_t string_dataformat;
h5tool_format_t outputformat;
H5R_ref_t *ref_buf = NULL;
+ h5tools_context_t datactx = *ctx; /* print context */
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter file=%p", (void*)stream);
@@ -4029,8 +4030,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
if (H5Tget_class(f_type) == H5T_REFERENCE) {
- ctx->indent_level++;
- h5tools_context_t datactx = *ctx; /* print context */
+ datactx.indent_level++;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference class type");
if (!H5Tequal(f_type, H5T_STD_REF) && !H5Tequal(f_type, H5T_STD_REF_DSETREG) && !H5Tequal(f_type, H5T_STD_REF_OBJ)) {
HGOTO_DONE(SUCCEED);
@@ -4260,13 +4260,12 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
} /* end switch */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "finished reference loop:%d",i);
- } /* end for(i = 0; i < ndims; i++, ctx->cur_elmt++, elmt_counter++) */
+ } /* end for(i = 0; i < ndims; i++, datactx->cur_elmt++, elmt_counter++) */
HDfree(ref_buf);
}
- ctx->indent_level--;
+ datactx.indent_level--;
}
else {
- h5tools_context_t datactx = *ctx; /* print context */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the values");
string_dataformat = *info;
if((datactx.display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) {