diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2007-05-18 15:14:43 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2007-05-18 15:14:43 (GMT) |
commit | 87a41d4286718ebc06acf6a9021ea85b9a93f278 (patch) | |
tree | 1e1946e375f700573b5718020a16c7e117f33c76 /src/H5FDmpiposix.c | |
parent | 513c74a8da0e7bb29b727ddc1409e7e6d7902461 (diff) | |
download | hdf5-87a41d4286718ebc06acf6a9021ea85b9a93f278.zip hdf5-87a41d4286718ebc06acf6a9021ea85b9a93f278.tar.gz hdf5-87a41d4286718ebc06acf6a9021ea85b9a93f278.tar.bz2 |
[svn-r13766] In Visual Studio 2005 for 64-bit, _WIN32 is defined, but not WIN32, so I've standardized all #ifdef's to use _WIN32. This should not affect any other platform.
Tested:
Visual Studio (32- and 64-bit) on Win XP
Diffstat (limited to 'src/H5FDmpiposix.c')
-rw-r--r-- | src/H5FDmpiposix.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c index df39291..6c30065 100644 --- a/src/H5FDmpiposix.c +++ b/src/H5FDmpiposix.c @@ -99,7 +99,7 @@ typedef struct H5FD_mpiposix_t { size_t blksize; /* Block size of file system */ #endif hbool_t use_gpfs; /* Use GPFS to write things */ -#ifndef WIN32 +#ifndef _WIN32 /* * On most systems the combination of device and i-node number uniquely * identify a file. @@ -108,7 +108,7 @@ typedef struct H5FD_mpiposix_t { ino_t inode; /*file i-node number */ #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 @@ -138,7 +138,7 @@ typedef struct H5FD_mpiposix_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 @@ -620,7 +620,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id, H5FD_mpiposix_fapl_t _fa; /* Private copy of default file access property list information */ H5P_genplist_t *plist; /* Property list pointer */ h5_stat_t sb; /* Portable 'stat' struct */ -#ifdef WIN32 +#ifdef _WIN32 HFILE filehandle; struct _BY_HANDLE_FILE_INFORMATION fileinfo; int results; @@ -754,7 +754,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id, file->fd = fd; file->eof = sb.st_size; - /* for WIN32 support. WIN32 'stat' does not have st_blksize and st_blksize + /* for _WIN32 support. _WIN32 'stat' does not have st_blksize and st_blksize is only used for the H5_HAVE_GPFS case */ #ifdef H5_HAVE_GPFS file->blksize = sb.st_blksize; @@ -773,7 +773,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id, file->op = OP_UNKNOWN; /* Set the information for the file's device and inode */ -#ifdef WIN32 +#ifdef _WIN32 filehandle = _get_osfhandle(fd); results = GetFileInformationByHandle((HANDLE)filehandle, &fileinfo); file->fileindexhi = fileinfo.nFileIndexHigh; @@ -868,7 +868,7 @@ H5FD_mpiposix_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_ENTER_NOAPI(H5FD_mpiposix_cmp, H5FD_VFD_DEFAULT) -#ifdef WIN32 +#ifdef _WIN32 if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1) if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1) @@ -1383,10 +1383,10 @@ static herr_t H5FD_mpiposix_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing) { H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file; -#ifdef WIN32 +#ifdef _WIN32 HFILE filehandle; /* Windows file handle */ LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */ -#endif /* WIN32 */ +#endif /* _WIN32 */ int mpi_code; /* MPI return code */ herr_t ret_value=SUCCEED; @@ -1399,7 +1399,7 @@ H5FD_mpiposix_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing if(file->eoa>file->last_eoa) { /* Use the round-robin process to truncate (extend) the file */ if(file->mpi_rank == H5_PAR_META_WRITE) { -#ifdef WIN32 +#ifdef _WIN32 /* Map the posix file handle to a Windows file handle */ filehandle = _get_osfhandle(file->fd); @@ -1409,10 +1409,10 @@ H5FD_mpiposix_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing 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)) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#endif /* WIN32 */ +#endif /* _WIN32 */ } /* end if */ /* Don't let any proc return until all have extended the file. |