From b2120ac99316bc065a13e1ae3411eb968663a2f8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 Mar 2011 10:32:58 -0500 Subject: [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 --- tools/h5jam/h5jam.c | 13 +++---------- tools/h5jam/h5unjam.c | 11 +---------- 2 files changed, 4 insertions(+), 20 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 -#include -#include -#ifdef H5_HAVE_UNISTD_H -#include -#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; diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index fd79e1a..bfebc6c 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -13,15 +13,6 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include -#include -#include - -#ifdef H5_HAVE_UNISTD_H -#include -#endif - #include "hdf5.h" #include "H5private.h" #include "h5tools_utils.h" @@ -177,7 +168,7 @@ main(int argc, const char *argv[]) herr_t status; hid_t plist; int res; - struct stat sbuf; + h5_stat_t sbuf; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); -- cgit v0.12