summaryrefslogtreecommitdiffstats
path: root/src/H5FDstdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r--src/H5FDstdio.c50
1 files changed, 49 insertions, 1 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 20350f1..ea53da9 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -216,7 +216,11 @@ hid_t
H5FD_stdio_init(void)
{
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
if (H5I_VFL!=H5Iget_type(H5FD_STDIO_g))
H5FD_STDIO_g = H5FDregister(&H5FD_stdio_g);
@@ -249,7 +253,11 @@ H5Pset_fapl_stdio(hid_t fapl_id)
/*NO TRACE*/
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
if(0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1)
@@ -309,7 +317,11 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
fapl_id=fapl_id;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
/* Check arguments */
if (!name || !*name)
@@ -397,7 +409,11 @@ H5FD_stdio_close(H5FD_t *_file)
static const char *func="H5FD_stdio_close"; /* Function Name for error reporting */
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
if (fclose(file->fp) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "fclose failed", -1)
@@ -434,7 +450,11 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_stdio_t *f2 = (const H5FD_stdio_t*)_f2;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
#ifdef WIN32
if (f1->fileindexhi < f2->fileindexhi) return -1;
@@ -524,7 +544,11 @@ H5FD_stdio_get_eoa(H5FD_t *_file)
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
return(file->eoa);
}
@@ -555,7 +579,11 @@ H5FD_stdio_set_eoa(H5FD_t *_file, haddr_t addr)
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
file->eoa = addr;
@@ -590,7 +618,11 @@ H5FD_stdio_get_eof(H5FD_t *_file)
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
return(MAX(file->eof, file->eoa));
}
@@ -620,8 +652,12 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
fapl=fapl;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
-
+#endif /* H5_WANT_H5_V1_6_COMPAT */
+
*file_handle = &(file->fp);
if(*file_handle==NULL)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "get handle failed", -1)
@@ -666,7 +702,11 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
dxpl_id=dxpl_id;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
/* Check for overflow */
if (HADDR_UNDEF==addr)
@@ -764,7 +804,11 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
type=type;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
/* Check for overflow conditions */
if (HADDR_UNDEF==addr)
@@ -841,7 +885,11 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
dxpl_id=dxpl_id;
/* Clear the error stack */
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ H5Eclear();
+#else
H5Eclear(H5E_DEFAULT);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
/* Only try to flush the file if we have write access */
if(file->write_access) {