summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2007-05-18 15:14:43 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2007-05-18 15:14:43 (GMT)
commit87a41d4286718ebc06acf6a9021ea85b9a93f278 (patch)
tree1e1946e375f700573b5718020a16c7e117f33c76 /src/H5FDsec2.c
parent513c74a8da0e7bb29b727ddc1409e7e6d7902461 (diff)
downloadhdf5-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/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index e7de10c..b01ba3f 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -66,7 +66,7 @@ typedef struct H5FD_sec2_t {
haddr_t eof; /*end of file; current file size*/
haddr_t pos; /*current file I/O position */
int op; /*last operation */
-#ifndef WIN32
+#ifndef _WIN32
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -79,7 +79,7 @@ typedef struct H5FD_sec2_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
@@ -110,7 +110,7 @@ typedef struct H5FD_sec2_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
@@ -337,7 +337,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
int o_flags;
int fd=(-1);
H5FD_sec2_t *file=NULL;
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -377,7 +377,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
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;
@@ -468,7 +468,7 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_NOAPI(H5FD_sec2_cmp, H5FD_VFD_DEFAULT)
-#ifdef WIN32
+#ifdef _WIN32
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -879,7 +879,7 @@ H5FD_sec2_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 */
@@ -892,10 +892,10 @@ H5FD_sec2_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;