From fcd32e5f595d2a8117963a6dce0a35b65eadc82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 10 Sep 2015 09:03:23 +0200 Subject: [PATCH] 2015-09-10 09:03 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/filesys.c ! use CRTL eof() function only in non DJGPP DOS builds --- ChangeLog.txt | 4 ++++ src/rtl/filesys.c | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 2f513e4e0e..3594bbc9f3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-09-10 09:03 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/filesys.c + ! use CRTL eof() function only in non DJGPP DOS builds + 2015-09-09 23:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbhpdf/3rd/libhpdf/hpdfimac.c ! removed obsolete memory.h diff --git a/src/rtl/filesys.c b/src/rtl/filesys.c index 9df28f11b4..4e15578ea0 100644 --- a/src/rtl/filesys.c +++ b/src/rtl/filesys.c @@ -4524,9 +4524,10 @@ HB_BOOL hb_fsEof( HB_FHANDLE hFileHandle ) hb_vmUnlock(); -#if defined( __DJGPP__ ) || defined( __CYGWIN__ ) || \ - defined( HB_OS_WIN ) || defined( HB_OS_WIN_CE ) || \ - defined( HB_OS_UNIX ) +#if defined( HB_OS_DOS ) && ! defined( __DJGPP__ ) + fResult = eof( hFileHandle ) != 0; + hb_fsSetIOError( fResult, 0 ); +#else { HB_FOFFSET curPos; HB_FOFFSET endPos; @@ -4547,9 +4548,6 @@ HB_BOOL hb_fsEof( HB_FHANDLE hFileHandle ) hb_fsSetIOError( fResult, 0 ); fResult = ! fResult || curPos >= endPos; } -#else - fResult = eof( hFileHandle ) != 0; - hb_fsSetIOError( fResult, 0 ); #endif hb_vmLock();