summaryrefslogtreecommitdiffstats
path: root/tools/h5jam/h5jam.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-03-24 15:32:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-03-24 15:32:58 (GMT)
commitb2120ac99316bc065a13e1ae3411eb968663a2f8 (patch)
tree61ce30f6a64f9431790895a999a02ae43c9a7a10 /tools/h5jam/h5jam.c
parent3c866e69a678bb383fce11c31cb1b1e94eb1e6c1 (diff)
downloadhdf5-b2120ac99316bc065a13e1ae3411eb968663a2f8.zip
hdf5-b2120ac99316bc065a13e1ae3411eb968663a2f8.tar.gz
hdf5-b2120ac99316bc065a13e1ae3411eb968663a2f8.tar.bz2
[svn-r20310] 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.c13
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;