diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 871e41f877..c8c03d17c4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +20000501-18:55 GMT+1 Ryszard Glab + + *source/rtl/filesys.c + * added support for hb_fsCommit() in Unix-like OS + + *source/compiler/harbour.c + * fixed signed/unsigned warnings + 20000501-18:48 GMT+1 Victor Szakats * include/hbpcode.h diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index d887b0d1f4..ac066f148e 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -2582,10 +2582,10 @@ static void hb_compOptimizeJumps( void ) ULONG ulOptimized = 0; ULONG ulNextByte = 0; int * piShifts; - int iNOOP; + ULONG iNOOP; ULONG ulOffset; ULONG ulBytes2Copy; - int iJump; + ULONG iJump; BOOL bForward = FALSE; /* Needed so the pasting of PCODE pieces below will work correctly */ diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index b248bee850..8638f65591 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -1026,8 +1026,19 @@ void hb_fsCommit( FHANDLE hFileHandle ) /* NOTE: close() functions releases all lock regardles if it is an * original or duplicated file handle */ - s_uiErrorLast = FS_ERROR; - + #if defined(_POSIX_SYNCHRONIZED_IO) + /* faster - flushes data buffers only, without updating directory info + */ + if( fdatasync( hFileHandle ) < -1 ) + #else + /* slower - flushes all file data buffers and i-node info + */ + if( fsync( hFileHandle ) < -1 ) + #endif + s_uiErrorLast = FS_ERROR; /* failure */ + else + s_uiErrorLast = 0; + #else s_uiErrorLast = FS_ERROR;