diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-03-24 15:33:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-03-24 15:33:20 (GMT) |
commit | 2e84173af5257e1d1b2490633bad80dd47cd49e3 (patch) | |
tree | 1e8f6a08f305d1cbe36c672065c342b91f0ce323 /tools/h5jam/h5jam.c | |
parent | 3b796613755cc14712eee241523df84737e6f03c (diff) | |
download | hdf5-2e84173af5257e1d1b2490633bad80dd47cd49e3.zip hdf5-2e84173af5257e1d1b2490633bad80dd47cd49e3.tar.gz hdf5-2e84173af5257e1d1b2490633bad80dd47cd49e3.tar.bz2 |
[svn-r20311] Change incorrect use of "struct stat" to use "h5_stat_t". On windows, this used the wrong structure and caused crashes. Also removed includes from top of file - they are included with proper config checks in h5private.h.
Tested: local linux, windows
Diffstat (limited to 'tools/h5jam/h5jam.c')
-rw-r--r-- | tools/h5jam/h5jam.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c index d6d3d8f..5eaa26a 100644 --- a/tools/h5jam/h5jam.c +++ b/tools/h5jam/h5jam.c @@ -13,13 +13,6 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include <stdio.h> -#include <fcntl.h> -#include <sys/stat.h> -#ifdef H5_HAVE_UNISTD_H -#include <unistd.h> -#endif - #include "hdf5.h" #include "H5private.h" #include "h5tools_utils.h" @@ -177,8 +170,8 @@ main (int argc, const char *argv[]) hsize_t where; hsize_t newubsize; off_t fsize; - struct stat sbuf; - struct stat sbuf2; + h5_stat_t sbuf; + h5_stat_t sbuf2; int res; h5tools_setprogname(PROGRAMNAME); @@ -375,7 +368,7 @@ copy_some_to_file (int infid, int outfid, hsize_t startin, hsize_t startout, ssize_t limit) { char buf[1024]; - struct stat sbuf; + h5_stat_t sbuf; int res; ssize_t tot = 0; ssize_t howmuch = 0; |