From 47c0fe7abca006c0658077846d54f2023a2bfe62 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 7 Jul 2008 12:15:57 +0000 Subject: [PATCH] 2008-07-07 13:50 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/rtl/hbffind.c ! Added workaround for PellesC 5.00.1 hang bug. * config/w32/pocc.cf % Removed unnecessary '-I' switches. ! Removed ws2.lib from liblist to make it link with PellesC 5.00.1 (where this lib is not available anymore). --- harbour/config/w32/pocc.cf | 4 ++-- harbour/source/rtl/hbffind.c | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/harbour/config/w32/pocc.cf b/harbour/config/w32/pocc.cf index 86f52f56d2..0ad37f4bb1 100644 --- a/harbour/config/w32/pocc.cf +++ b/harbour/config/w32/pocc.cf @@ -14,7 +14,7 @@ LIB_EXT = .lib CC = pocc.exe CC_IN = -c CC_OUT = -Fo -CPPFLAGS = -I. -I$(TOP) -I$(TOP)$(ROOT) +CPPFLAGS = -I. CPPFLAGS += -Ze -Zx -Go @@ -59,7 +59,7 @@ endif LDFLAGS = $(LINKPATHS) kernel32.lib user32.lib \ winspool.lib ole32.lib oleaut32.lib uuid.lib \ comctl32.lib mapi32.lib advapi32.lib \ - gdi32.lib mpr.lib wsock32.lib ws2.lib ws2_32.lib \ + gdi32.lib mpr.lib wsock32.lib ws2_32.lib \ comdlg32.lib # ws2 ws2_32 diff --git a/harbour/source/rtl/hbffind.c b/harbour/source/rtl/hbffind.c index 4e17bf3e70..d104e460b6 100644 --- a/harbour/source/rtl/hbffind.c +++ b/harbour/source/rtl/hbffind.c @@ -596,8 +596,15 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) if( info->pFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) ffind->size = 0; else +#if defined(__XCC__) || __POCC__ >= 500 + /* NOTE: PellesC 5.00.1 will go into an infinite loop if we don't + split this into two operations. [vszakats] */ + ffind->size = ( HB_FOFFSET ) info->pFindFileData.nFileSizeLow; + ffind->size += ( HB_FOFFSET ) info->pFindFileData.nFileSizeHigh << 32; +#else ffind->size = ( HB_FOFFSET ) info->pFindFileData.nFileSizeLow + ( ( HB_FOFFSET ) info->pFindFileData.nFileSizeHigh << 32 ); +#endif raw_attr = ( USHORT ) info->pFindFileData.dwFileAttributes;