See ChangeLog entry 2004-01-08 16:45 UTC-0500 David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
2004-01-08 21:43:31 +00:00
parent dacbe27d9a
commit 6fb0107c2f
2 changed files with 8 additions and 6 deletions

View File

@@ -7,6 +7,9 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2004-01-08 16:45 UTC-0500 David G. Holm <dholm@jsd-llc.com>
* source/rtl/filesys.c
! Usage of fdatasync updated to match current POSIX specification.
2004-01-08 16:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>
* source/rtl/filesys.c

View File

@@ -1486,16 +1486,15 @@ void hb_fsCommit( FHANDLE hFileHandle )
/* NOTE: close() functions releases all lock regardles if it is an
* original or duplicated file handle
*/
#if defined(_POSIX_SYNCHRONIZED_IO)
#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
/* faster - flushes data buffers only, without updating directory info
*/
s_uiErrorLast = ( fdatasync( hFileHandle ) < -1 ) ? FS_ERROR : 0;
if( s_uiErrorLast == EINVAL || s_uiErrorLast == ENOSYS )
if( s_uiErrorLast == EINVAL )
{
/* Either fdatasync is not supported in this POSIX implementation or
this implementation does not support synchronised I/O for this file,
so use the slower method that flushes all file data buffers and i-node
info for this file.
/* This implementation does not support synchronised I/O for
this file, so use the slower method that flushes all file
data buffers and i-node info for this file.
*/
s_uiErrorLast = ( fsync( hFileHandle ) < -1 ) ? FS_ERROR : 0;
}