summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FDgass.c7
-rw-r--r--src/H5FDlog.c4
-rw-r--r--src/H5FDsec2.c6
3 files changed, 13 insertions, 4 deletions
diff --git a/src/H5FDgass.c b/src/H5FDgass.c
index 380903e..5ab0e8e 100644
--- a/src/H5FDgass.c
+++ b/src/H5FDgass.c
@@ -308,6 +308,11 @@ H5FD_gass_open(const char *name, unsigned flags, hid_t fapl_id,
H5FD_gass_t *file=NULL;
const H5FD_gass_fapl_t *fa=NULL;
H5FD_gass_fapl_t _fa;
+#ifdef WIN32
+ struct _stati64 sb;
+#else
+ struct stat sb;
+#endif
char *filename = (char *) H5MM_malloc(80 * sizeof(char));
FUNC_ENTER(H5FD_gass_open, NULL);
@@ -382,7 +387,7 @@ H5FD_gass_open(const char *name, unsigned flags, hid_t fapl_id,
}
- if (fstat(fd, &sb)<0) {
+ if (HDfstat(fd, &sb)<0) {
close(fd);
HRETURN_ERROR(H5E_IO, H5E_BADFILE, NULL, "fstat failed");
}
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 16a01cd..a93a524 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -413,13 +413,15 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
{
int o_flags;
int fd;
- struct stat sb;
H5FD_log_t *file=NULL;
H5FD_log_fapl_t *fa; /* File access property list information */
#ifdef WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
int results;
+ struct _stati64 sb;
+#else
+ struct stat sb;
#endif
FUNC_ENTER(H5FD_log_open, NULL);
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 60511bb..e29a2f8 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -267,12 +267,14 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
{
int o_flags;
int fd;
- struct stat sb;
H5FD_sec2_t *file=NULL;
#ifdef WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
int results;
+ struct _stati64 sb;
+#else
+ struct stat sb;
#endif
FUNC_ENTER(H5FD_sec2_open, NULL);
@@ -294,7 +296,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
/* Open the file */
if ((fd=HDopen(name, o_flags, 0666))<0)
HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file");
- if (fstat(fd, &sb)<0) {
+ if (HDfstat(fd, &sb)<0) {
close(fd);
HRETURN_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");
}