From 2c14e30ec3d71d4d777714e09cfdf721bc94d57d Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Fri, 10 Jan 2003 22:36:10 +0000 Subject: [PATCH] See ChangeLog entry 2003-01-10 17:30 UTC-0500 David G. Holm --- harbour/ChangeLog | 9 +++++++++ harbour/source/rtl/filesys.c | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e3740ba01a..c2c3b52daf 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-01-10 17:30 UTC-0500 David G. Holm + * source/rtl/filesys.c + ! The MingW32 use of _LK_UNLOCK instead of _LK_UNLCK turned out to + be a bug in a MingW32 that has since been corrected, so the fix + has been reverted. Thanks go to Phil Krylov for + pointing this out. In order to allow this to work with the buggy + version of MingW32, I've added a #define _LK_UNLCK _LK_UNLOCK if + compiling for __MINGW32__ and _LK_UNLCK is not defined. + 2003-01-10 17:00 UTC-0500 David G. Holm * source/rdd/dbfcdx/dbfcdx1.c ! hb_fsDelete takes a BYTE * parameter, not an unsigned char * one. diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 9d3874236e..6029f0526e 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -158,6 +158,9 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include #define ftruncate _chsize + #if defined(__MINGW32__) && !defined(_LK_UNLCK) + #define _LK_UNLCK _LK_UNLOCK + #endif #else #define ftruncate chsize #if !defined(HAVE_POSIX_IO) @@ -1378,7 +1381,7 @@ BOOL hb_fsLock ( FHANDLE hFileHandle, ULONG ulStart, break; case FL_UNLOCK: - bResult = ( _locking( hFileHandle, _LK_UNLOCK, ulLength ) == 0 ); + bResult = ( _locking( hFileHandle, _LK_UNLCK, ulLength ) == 0 ); break; default: