From 005a722992ccde1cfcdd143e7f2871413c4cc8c5 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 26 Dec 2000 16:59:19 -0500 Subject: [svn-r3204] Purpose: Bug Fix Description: The #ifdef ... #else statement had no line breaks in it. This caused the compiler on Sangamon to freak out saying the #ifdef was invalid. Solution: Put line breaks in it. Platforms tested: Sangamon --- src/H5FDstdio.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 6dd5337..29fcffc 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -711,15 +711,23 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, /* * Seek to the correct file position. */ - if (!(file->op == H5FD_STDIO_OP_WRITE || file->op==H5FD_STDIO_OP_SEEK) || + if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || file->pos != addr) { -#ifdef WIN32 fpos_t tempos =(fpos_t)(addr+SEEK_SET); if (fsetpos(file->fp,&tempos)!=0) { file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; H5Epush_ret(func, H5E_IO, H5E_SEEKERROR, "fsetpos failed", -1); } #else +#ifdef WIN32 + fpos_t tempos =(fpos_t)(addr+SEEK_SET); + + if (fsetpos(file->fp,&tempos) != 0) { + file->op = H5FD_STDIO_OP_UNKNOWN; + file->pos = HADDR_UNDEF; + H5Epush_ret(func, H5E_IO, H5E_SEEKERROR, "fsetpos failed", -1); + } +#else if (fseek(file->fp, (long)addr, SEEK_SET) < 0) { file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; H5Epush_ret(func, H5E_IO, H5E_SEEKERROR, "fseek failed", -1); } -#endif +#endif /* WIN32 */ file->pos = addr; } -- cgit v0.12