From 7c832af9aa0db8c98d6dc0a3610c5e2ad14a8da3 Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Thu, 17 Apr 2003 17:19:17 -0500 Subject: [svn-r6707] Purpose: A compiling error fixed for windows only Description: Use file handler instead of file stream at H5FDstdio.c when using getfileHandle function of windows. Solution: see above, however; stdio driver tests failed on windows. I am still investigating the bug. The current check will not fix the failure of stdio driver test on windows. The good news is that it won't affect the release since the default driver used for test is sec2 driver and all tests passed for sec2 driver on windows. Platforms tested: windows 2000 and confirmed at Linux. Since the only change is two-line code inside #ifdef WIN32 #endif macro block, it is not necessary to test all UNIX platforms. Still confirmed at eirene. Misc. update: --- src/H5FDstdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 5e7246a..f7510fe 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -875,9 +875,10 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing) #ifdef WIN32 HFILE filehandle; /* Windows file handle */ LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */ + fd = _fileno(file->fp); /* Map the posix file handle to a Windows file handle */ - filehandle = _get_osfhandle(file->fd); + filehandle = _get_osfhandle(fd); /* Translate 64-bit integers into form Windows wants */ /* [This algorithm is from the Windows documentation for SetFilePointer()] */ -- cgit v0.12