diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2008-06-05 21:39:30 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2008-06-05 21:39:30 (GMT) |
commit | 0b5f34bfa659d0cde87a1f120843f8003ee2a81b (patch) | |
tree | f0be04385aa11f4c7fd6c556d8ffaedf3b96bf60 /src/H5FDlog.c | |
parent | 13cc35de119303658b5facaf993632a4a57b15a4 (diff) | |
download | hdf5-0b5f34bfa659d0cde87a1f120843f8003ee2a81b.zip hdf5-0b5f34bfa659d0cde87a1f120843f8003ee2a81b.tar.gz hdf5-0b5f34bfa659d0cde87a1f120843f8003ee2a81b.tar.bz2 |
[svn-r15160] Purpose: Separate Windows function macro definitions to win32defs.h
Description:
In library code, we try not to use system calls directly, but instead use the HD{function} macro instead. This way, we can map special versions of the call on particular systems. Previously, it was all done in H5private.h. However, in an effort to clean up platform-specific definitions, we move all of the Windows macros into a separate file, win32defs.h. This way, we can use the non-Posix versions that Visual Studio sends warnings about.
Some macros are set specifically in the platform-specific header files. Then, any macros left unset will be set by the "default" implementation in H5private.h.
This checkin also cleans up various source files to use the HD* macros when possible.
Tested:
VS2005 on WinXP
VS.NET on WinXP
h5committest (kagiso, linew, smirom)
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index df07c0a..dee4581 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -628,7 +628,7 @@ H5FD_log_close(H5FD_t *_file) if(file->fa.flags&H5FD_LOG_TIME_CLOSE) HDgettimeofday(&timeval_start,NULL); #endif /* H5_HAVE_GETTIMEOFDAY */ - if (close(file->fd)<0) + if (HDclose(file->fd)<0) HGOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file") #ifdef H5_HAVE_GETTIMEOFDAY if(file->fa.flags&H5FD_LOG_TIME_CLOSE) @@ -1331,7 +1331,7 @@ H5FD_log_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing) if(file->eoa>file->eof) { if(-1 == file_seek(file->fd, (file_offset_t)(file->eoa - 1), SEEK_SET)) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") - if(write(file->fd, "", (size_t)1) != 1) + if(HDwrite(file->fd, "", (size_t)1) != 1) HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") file->eof = file->eoa; file->pos = file->eoa; |