summaryrefslogtreecommitdiffstats
path: root/tools/h5jam
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-02-22 19:37:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-02-22 19:37:06 (GMT)
commit727b687ae6c80c9854cb53814fa1c12f27c2994c (patch)
treefabe359aaddbe3b4d1e2bb58ceb3b94311d66a1c /tools/h5jam
parent25486d50895fa4a30809d289b9aff4de583a9b84 (diff)
downloadhdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.zip
hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.gz
hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.bz2
[svn-r20146] Description:
Bring r19714:20145 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.6 (amazon) in debug mode Mac OS X/32 10.6.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'tools/h5jam')
-rw-r--r--tools/h5jam/CMakeLists.txt15
-rw-r--r--tools/h5jam/Makefile.in3
-rw-r--r--tools/h5jam/h5jam.c46
-rw-r--r--tools/h5jam/h5unjam.c16
4 files changed, 30 insertions, 50 deletions
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 69b3e75..215dbc8 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -11,23 +11,19 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# Add the h5jam executables
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
-H5_NAMING (h5jam)
-TARGET_WIN_PROPERTIES (h5jam)
+H5_NAMING (h5jam ${LIB_TYPE})
TARGET_LINK_LIBRARIES (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_EXECUTABLE (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
-H5_NAMING (getub)
-TARGET_WIN_PROPERTIES (getub)
+H5_NAMING (getub ${LIB_TYPE})
TARGET_LINK_LIBRARIES (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_EXECUTABLE (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
-H5_NAMING (tellub)
-TARGET_WIN_PROPERTIES (tellub)
+H5_NAMING (tellub ${LIB_TYPE})
TARGET_LINK_LIBRARIES (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_EXECUTABLE (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
-H5_NAMING (h5unjam)
-TARGET_WIN_PROPERTIES (h5unjam)
+H5_NAMING (h5unjam ${LIB_TYPE})
TARGET_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES
@@ -49,8 +45,7 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
- H5_NAMING (h5jamgentest)
- TARGET_WIN_PROPERTIES (h5jamgentest)
+ H5_NAMING (h5jamgentest ${LIB_TYPE})
TARGET_LINK_LIBRARIES (h5jamgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index aac8ece..4026510 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -160,6 +160,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
@@ -221,6 +222,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
@@ -277,6 +279,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c
index 17b1384..d6d3d8f 100644
--- a/tools/h5jam/h5jam.c
+++ b/tools/h5jam/h5jam.c
@@ -238,41 +238,33 @@ main (int argc, const char *argv[])
exit (EXIT_FAILURE);
}
- H5Pclose (plist);
- H5Fclose (ifile);
+ H5Pclose(plist);
+ H5Fclose(ifile);
- ufid = HDopen (ub_file, O_RDONLY, 0);
-
- if (ufid < 0)
- {
+ ufid = HDopen(ub_file, O_RDONLY, 0);
+ if(ufid < 0) {
error_msg("unable to open user block file \"%s\"\n",
ub_file);
exit (EXIT_FAILURE);
}
- res = stat (ub_file, &sbuf);
-
- if (res < 0)
- {
+ res = HDfstat(ufid, &sbuf);
+ if(res < 0) {
error_msg("Can't stat file \"%s\"\n", ub_file);
exit (EXIT_FAILURE);
}
fsize = sbuf.st_size;
- h5fid = HDopen (input_file, O_RDONLY, 0);
-
- if (h5fid < 0)
- {
+ h5fid = HDopen(input_file, O_RDONLY, 0);
+ if(h5fid < 0) {
error_msg("unable to open HDF5 file for read \"%s\"\n",
input_file);
exit (EXIT_FAILURE);
}
- res = stat (input_file, &sbuf2);
-
- if (res < 0)
- {
+ res = HDfstat(h5fid, &sbuf2);
+ if(res < 0) {
error_msg("Can't stat file \"%s\"\n", input_file);
exit (EXIT_FAILURE);
}
@@ -396,19 +388,15 @@ copy_some_to_file (int infid, int outfid, hsize_t startin, hsize_t startout,
ssize_t toend;
ssize_t fromend;
- if (startin > startout)
- {
+ if(startin > startout) {
/* this case is prohibited */
error_msg("copy_some_to_file: panic: startin > startout?\n");
exit (EXIT_FAILURE);
}
- if (limit < 0)
- {
- res = fstat (infid, &sbuf);
-
- if (res < 0)
- {
+ if(limit < 0) {
+ res = HDfstat(infid, &sbuf);
+ if(res < 0) {
error_msg("Can't stat file \n");
exit (EXIT_FAILURE);
}
@@ -416,14 +404,10 @@ copy_some_to_file (int infid, int outfid, hsize_t startin, hsize_t startout,
howmuch = sbuf.st_size;
}
else
- {
howmuch = limit;
- }
- if (howmuch == 0)
- {
+ if(howmuch == 0)
return 0;
- }
/* assert (howmuch > 0) */
diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c
index 8e31ce1..fd79e1a 100644
--- a/tools/h5jam/h5unjam.c
+++ b/tools/h5jam/h5unjam.c
@@ -221,22 +221,20 @@ main(int argc, const char *argv[])
}
- res = stat(input_file, &sbuf);
+ ifid = HDopen(input_file,O_RDONLY,0);
+ if(ifid < 0) {
+ error_msg("unable to open input HDF5 file \"%s\"\n", input_file);
+ exit(EXIT_FAILURE);
+ }
- if (res < 0) {
+ res = HDfstat(ifid, &sbuf);
+ if(res < 0) {
error_msg("Can't stat file \"%s\"\n", input_file);
exit(EXIT_FAILURE);
}
fsize = sbuf.st_size;
- ifid = HDopen(input_file,O_RDONLY,0);
-
- if (ifid < 0) {
- error_msg("unable to open input HDF5 file \"%s\"\n", input_file);
- exit(EXIT_FAILURE);
- }
-
if (do_delete && (ub_file != NULL)) {
error_msg("??\"%s\"\n", ub_file);
exit(EXIT_FAILURE);