summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7908fd9..3618474 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -62,7 +62,7 @@ typedef struct H5FD_sec2_t {
haddr_t pos; /*current file I/O position */
H5FD_file_op_t op; /*last operation */
char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
-#ifndef _WIN32
+#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -75,7 +75,7 @@ typedef struct H5FD_sec2_t {
#endif /*H5_VMS*/
#else
/*
- * On _WIN32 the low-order word of a unique identifier associated with the
+ * On H5_HAVE_WIN32_API 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
@@ -314,7 +314,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5FD_sec2_t *file = NULL; /* sec2 VFD info */
int fd = (-1); /* File descriptor */
int o_flags; /* Flags for open() call */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -360,12 +360,12 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
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 H5_HAVE_WIN32_API
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
file->fileindexlo = fileinfo.nFileIndexLow;
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
#ifdef H5_VMS
file->inode[0] = sb.st_ino[0];
@@ -375,7 +375,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->inode = sb.st_ino;
#endif /*H5_VMS*/
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
HDstrncpy(file->filename, name, sizeof(file->filename));
@@ -474,7 +474,7 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_cmp)
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
if(f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if(f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -861,7 +861,7 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
/* Extend the file to make sure it's large enough */
if(!H5F_addr_eq(file->eoa, file->eof)) {
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
@@ -874,7 +874,7 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t 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 /* H5_HAVE_WIN32_API */
#ifdef H5_VMS
/* Reset seek offset to the beginning of the file, so that the file isn't
* re-extended later. This may happen on Open VMS. */
@@ -884,7 +884,7 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Update the eof value */
file->eof = file->eoa;