From eb16d8bc2b2f37c7a1d75fe7bf5258eba21515b2 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 27 Aug 2007 17:35:50 -0500 Subject: [svn-r14114] Purpose: Fix a subtle Windows bug in h5unjam Description: In h5unjam.c, there was a call to "open", rather than "HDopen". This isn't a problem on most platforms, as the are equivalent. However, on Windows, we use the HDopen macro to unconditionally set the O_BINARY flag. This is needed to safely seek within a file. Tested: VS2005 on WinXP h5committest (kagiso linew smirom) --- tools/h5jam/h5unjam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 0edc980..ac927c8 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -252,7 +252,7 @@ main(int argc, const char *argv[]) exit(EXIT_FAILURE); } } else { - h5fid = open(output_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 ); + h5fid = HDopen(output_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 ); if (h5fid < 0) { error_msg(progname, "unable to open output HDF5 file \"%s\"\n", output_file); -- cgit v0.12