diff options
Diffstat (limited to 'src/H5FDdirect.c')
-rw-r--r-- | src/H5FDdirect.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 78db28e..23ff0fe 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -77,7 +77,7 @@ typedef struct H5FD_direct_t { haddr_t pos; /*current file I/O position */ int op; /*last operation */ H5FD_direct_fapl_t fa; /*file access properties */ -#ifndef WIN32 +#ifndef _WIN32 /* * On most systems the combination of device and i-node number uniquely * identify a file. @@ -90,7 +90,7 @@ typedef struct H5FD_direct_t { #endif /*H5_VMS*/ #else /* - * On WIN32 the low-order word of a unique identifier associated with the + * On _WIN32 the low-order word of a unique identifier associated with the * file and the volume serial number uniquely identify a file. This number * (which, both? -rpm) may change when the system is restarted or when the * file is opened. After a process opens a file, the identifier is @@ -120,7 +120,7 @@ typedef struct H5FD_direct_t { # define file_offset_t off64_t # define file_seek lseek64 # define file_truncate ftruncate64 -#elif defined (WIN32) && !defined(__MWERKS__) +#elif defined (_WIN32) && !defined(__MWERKS__) # /*MSVC*/ # define file_offset_t __int64 # define file_seek _lseeki64 @@ -491,7 +491,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd int fd=(-1); H5FD_direct_t *file=NULL; H5FD_direct_fapl_t *fa; -#ifdef WIN32 +#ifdef _WIN32 HFILE filehandle; struct _BY_HANDLE_FILE_INFORMATION fileinfo; #endif @@ -542,7 +542,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t); file->pos = HADDR_UNDEF; file->op = OP_UNKNOWN; -#ifdef WIN32 +#ifdef _WIN32 filehandle = _get_osfhandle(fd); (void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo); file->fileindexhi = fileinfo.nFileIndexHigh; @@ -556,7 +556,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd #else file->inode = sb.st_ino; #endif /*H5_VMS*/ -#endif /*WIN32*/ +#endif /*_WIN32*/ file->fa.mboundary = fa->mboundary; file->fa.fbsize = fa->fbsize; file->fa.cbsize = fa->cbsize; @@ -668,7 +668,7 @@ H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_ENTER_NOAPI(H5FD_direct_cmp, H5FD_VFD_DEFAULT) -#ifdef WIN32 +#ifdef _WIN32 if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1) if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1) @@ -1266,7 +1266,7 @@ H5FD_direct_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing) /* Extend the file to make sure it's large enough */ if (file->eoa!=file->eof) { -#ifdef WIN32 +#ifdef _WIN32 HFILE filehandle; /* Windows file handle */ LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */ @@ -1279,10 +1279,10 @@ H5FD_direct_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing) (void)SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN); if(SetEndOfFile((HANDLE)filehandle)==0) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* WIN32 */ +#else /* _WIN32 */ if (-1==file_truncate(file->fd, (file_offset_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#endif /* WIN32 */ +#endif /* _WIN32 */ /* Update the eof value */ file->eof = file->eoa; |