diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 43a48f1087..b010941535 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,42 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-13 01:11 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * doc/whatsnew.txt + * Extended releases notes/issues section. + + * config/w32/dm.cf + ! Fixed to exclude "possible extraneous ';'" warnings + for every for()/while()/etc constructs with an empty body. + ! Further fixes to link/lib rules. + ; TOFIX1: odbc.c, gtwvg.c still don't compile. + ; TOFIX2: Harbour executables won't run, by simply doing nothing. + + * source/rtl/gtwvt/gtwvt.c + ! Fixed to compile with __DMC__. + ; NOTE: Przemek, could you please check these? + + * include/hbsetup.h + ! snprintf() for __DMC__. + + * contrib/hbw32/dllcall.c + ! Fixed casting for __DMC__. + + * contrib/hbsqlit3/hbsqlit3.c + ! Workaround for Pelles C 4.5 and Open Watcom, so that + sqlite3.c won't be included for these compilers. + Pelles C 4.5 crashes, Open Watcom 1.7 goes into an + infinite loop on this huge file. For thes compilers + the sqlite3 library should be supplied by the users. + + * contrib/hbapollo/apollo.c + ! Fixed to compile with Open Watcom. + + * source/vm/mainwin.c + * source/vm/hvm.c + ! Fix for __DMC__ startup problem: + 'OPTLINK : Warning 134: No Start Address' + 2008-08-12 22:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/config/w32/dm.cf * updated for central library directory used by Harbour - not tested diff --git a/harbour/config/w32/dm.cf b/harbour/config/w32/dm.cf index c1911e701c..ca7c15fbe2 100644 --- a/harbour/config/w32/dm.cf +++ b/harbour/config/w32/dm.cf @@ -17,25 +17,26 @@ CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = -6 -cpp -mn -o+time +# Suppressing "possible extraneous ';'" warnings. [vszakats] +CFLAGS += -w7 # Add all libraries specified in CONTRIBS and LIBS. ifeq ($(HB_LIB_COMPILE),) -LINKPATHS += -L$(LIB_DIR) +LINKLIBS += $(foreach lib, $(CONTRIBS), $(LIB_DIR)\$(lib)$(LIB_EXT)) +LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)\$(lib)$(LIB_EXT)) else -LINKPATHS += -L$(HB_LIB_COMPILE) +LINKLIBS += $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)\$(lib)$(LIB_EXT)) +LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)\$(lib)$(LIB_EXT)) endif -LINKLIBS += $(foreach lib, $(CONTRIBS), $(lib)$(LIB_EXT)) -LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) - # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) +LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)$(LIB_EXT)) endif # Add the specified GT driver library and other RTLs ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)$(LIB_EXT)) endif ifneq ($(HB_SCREEN_LIB),) @@ -43,9 +44,9 @@ LINKLIBS += $(HB_SCREEN_LIB) endif # Add the optional user path(s) -ifneq ($(LNK_USR_PATH),) -LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path)) -endif +#ifneq ($(LNK_USR_PATH),) +#LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path)) +#endif # Add the optional user libarary (or libraries) ifneq ($(LNK_USR_LIB),) @@ -77,7 +78,7 @@ endef AR = lib ARFLAGS = -c $(A_USR) AROBJS = $(foreach file, $(^F), $(file)) -AR_RULE = $(AR) $(ARFLAGS) $@ $(AROBJS) +AR_RULE = $(AR) $(ARFLAGS) $(LIB_DIR)/$@ $(AROBJS) ifeq ($(COMMAND_COM),yes) # workaround for command line size limit diff --git a/harbour/contrib/hbapollo/apollo.c b/harbour/contrib/hbapollo/apollo.c index 96904e818f..d62e8eb57a 100644 --- a/harbour/contrib/hbapollo/apollo.c +++ b/harbour/contrib/hbapollo/apollo.c @@ -56,7 +56,7 @@ /* NOTE: This hack is needed to suppress 'non-ANSI keyword' warnings inside Sde61.h. */ -#if defined( __BORLANDC__ ) +#if defined( __BORLANDC__ ) || defined( __WATCOMC__ ) #define _declspec __declspec #endif diff --git a/harbour/contrib/hbsqlit3/hbsqlit3.c b/harbour/contrib/hbsqlit3/hbsqlit3.c index 3dc095bc2a..336af0810f 100644 --- a/harbour/contrib/hbsqlit3/hbsqlit3.c +++ b/harbour/contrib/hbsqlit3/hbsqlit3.c @@ -28,34 +28,42 @@ char *sqlite3_snprintf(int,char*,const char*, ...); */ -#if defined( __GCC__ ) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2 - #pragma GCC diagnostic ignored "-Wunused" - #pragma GCC diagnostic ignored "-Wsign-compare" - #pragma GCC diagnostic ignored "-Wuninitialized" -#elif defined( __BORLANDC__ ) - #pragma warn -aus - #pragma warn -use - #pragma warn -par - #pragma warn -prc - #pragma warn -eff - #pragma warn -amp -#elif defined( _MSC_VER ) - #pragma warning( disable: 4018 4244 ) -#endif -#include "sqlite3/sqlite3.c" -#if defined( __GCC__ ) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2 - #pragma GCC diagnostic warning "-Wunused" - #pragma GCC diagnostic warning "-Wsign-compare" - #pragma GCC diagnostic warning "-Wuninitialized" -#elif defined( __BORLANDC__ ) - #pragma warn +aus -/* #pragma warn +use */ /* This affects the whole file, so don't turn it back on. */ - #pragma warn +par - #pragma warn +prc - #pragma warn +eff - #pragma warn +amp -#elif defined( _MSC_VER ) - #pragma warning( default: 4018 4244 ) +#if defined( __WATCOMC__ ) || (defined(__POCC__) && __POCC__ <= 450) + /* NOTE: Don't include the full library for those compilers + which cannot compile it, due its large size. + In these case the library should be linked separately. + [vszakats] */ + #include "sqlite3/sqlite3.h" +#else + #if defined( __GCC__ ) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2 + #pragma GCC diagnostic ignored "-Wunused" + #pragma GCC diagnostic ignored "-Wsign-compare" + #pragma GCC diagnostic ignored "-Wuninitialized" + #elif defined( __BORLANDC__ ) + #pragma warn -aus + #pragma warn -use + #pragma warn -par + #pragma warn -prc + #pragma warn -eff + #pragma warn -amp + #elif defined( _MSC_VER ) + #pragma warning( disable: 4018 4244 ) + #endif + #include "sqlite3/sqlite3.c" + #if defined( __GCC__ ) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2 + #pragma GCC diagnostic warning "-Wunused" + #pragma GCC diagnostic warning "-Wsign-compare" + #pragma GCC diagnostic warning "-Wuninitialized" + #elif defined( __BORLANDC__ ) + #pragma warn +aus + /* #pragma warn +use */ /* This affects the whole file, so don't turn it back on. */ + #pragma warn +par + #pragma warn +prc + #pragma warn +eff + #pragma warn +amp + #elif defined( _MSC_VER ) + #pragma warning( default: 4018 4244 ) + #endif #endif #include "hbvm.h" diff --git a/harbour/contrib/hbw32/dllcall.c b/harbour/contrib/hbw32/dllcall.c index c26f894f6a..3ce1c05797 100644 --- a/harbour/contrib/hbw32/dllcall.c +++ b/harbour/contrib/hbw32/dllcall.c @@ -768,10 +768,10 @@ HB_FUNC( DLLPREPARECALL ) if( ISCHAR( 1 ) ) FreeLibrary( xec->hDLL ); - pszErrorText = ISCHAR( 3 ) ? "Invalid function name" : "Invalid function ordinal"; + pszErrorText = ISCHAR( 3 ) ? ( char * ) "Invalid function name" : ( char * ) "Invalid function ordinal"; } else - pszErrorText = ISCHAR( 1 ) ? "Invalid library name" : "Invalid library handle"; + pszErrorText = ISCHAR( 1 ) ? ( char * ) "Invalid library name" : ( char * ) "Invalid library handle"; hb_gcFree( xec ); diff --git a/harbour/doc/whatsnew.txt b/harbour/doc/whatsnew.txt index 803829d5ae..43351f242a 100644 --- a/harbour/doc/whatsnew.txt +++ b/harbour/doc/whatsnew.txt @@ -88,12 +88,22 @@ Contrib - hbsqlit3 warning fixes and error fixes for some compilers/modes. - Added DirectoryRecurse() to xhb.lib. -Known issues +Known build issues ============================= - Harbour won't currently compile with MSVC in 64 bit C mode. Use C++ mode instead with commands 'set HB_BUILD_MODE=cpp' - and 'make_vc.bat') -- Contrib hbfimage won't currently compile on Linux systems. + and 'make_vc.bat'. +- Contrib hbfimage won't currently compile on Linux systems + and with Open Watcom compilers. This will be addressed in + a future version. +- Contrib hbsqlit3 will not include sqlite3 library code for + Pelles C 4.5 and Open Watcom 1.7 due to fatal compile problems + in foreign code. For these compilers you will have to supply + sqlite3 library yourself. For other compilers, some warnings + are expected and normal in non-Harbour code. +- Windows 64 bit builds may generate an excessive amount of integer + size conversion warnings. This is currently normal and will be + addressed in a future version. Version 1.0.0 rc2 (2008-07-01) tag: 1.0.0rc2 diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 1032ce7014..0e5248043b 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -372,7 +372,7 @@ #if ( __DJGPP__ < 2 || ( __DJGPP__ == 2 && __DJGPP_MINOR__ <= 3 ) ) #define snprintf(s, len, args...) sprintf( (s), ##args ) #endif -#elif defined( _MSC_VER ) && !defined( __XCC__ ) +#elif defined( _MSC_VER ) || defined( __DMC__ ) && !defined( __XCC__ ) #define snprintf _snprintf #elif defined( __WATCOMC__ ) #if __WATCOMC__ < 1200 diff --git a/harbour/source/rtl/gtwvt/gtwvt.c b/harbour/source/rtl/gtwvt/gtwvt.c index 64216673c9..17efe67c58 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.c +++ b/harbour/source/rtl/gtwvt/gtwvt.c @@ -1452,7 +1452,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara /* Enable "maximize" button */ -#if defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) && !defined(HB_ARCH_64BIT) +#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT) SetWindowLong( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME ); #else SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME ); @@ -1483,7 +1483,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara hb_gt_wvt_FitSize( pWVT ); /* Disable "maximize" button */ -#if defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) && !defined(HB_ARCH_64BIT) +#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT) SetWindowLong( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_THICKFRAME ); #else SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_THICKFRAME ); @@ -1856,17 +1856,17 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_INPUTFD: pInfo->pResult = hb_itemPutNInt( pInfo->pResult, - ( UINT_PTR ) GetStdHandle( STD_INPUT_HANDLE ) ); + ( HB_LONG ) GetStdHandle( STD_INPUT_HANDLE ) ); break; case HB_GTI_OUTPUTFD: pInfo->pResult = hb_itemPutNInt( pInfo->pResult, - ( UINT_PTR ) GetStdHandle( STD_OUTPUT_HANDLE ) ); + ( HB_LONG ) GetStdHandle( STD_OUTPUT_HANDLE ) ); break; case HB_GTI_ERRORFD: pInfo->pResult = hb_itemPutNInt( pInfo->pResult, - ( UINT_PTR ) GetStdHandle( STD_ERROR_HANDLE ) ); + ( HB_LONG ) GetStdHandle( STD_ERROR_HANDLE ) ); break; case HB_GTI_FONTSIZE: @@ -2080,7 +2080,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) SendMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) hIcon ); /* Set Task List Icon */ } } - pInfo->pResult = hb_itemPutNInt( pInfo->pResult, ( UINT_PTR ) hIcon ); + pInfo->pResult = hb_itemPutNInt( pInfo->pResult, ( HB_LONG ) hIcon ); break; } @@ -2096,7 +2096,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) else if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC ) { hIcon = LoadIcon( ( HINSTANCE ) s_hInstance, - MAKEINTRESOURCE( ( UINT_PTR ) + MAKEINTRESOURCE( ( HB_LONG ) hb_itemGetNInt( pInfo->pNewVal ) ) ); } if( hIcon ) @@ -2104,7 +2104,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) SendMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) hIcon ); /* Set Title Bar Icon */ SendMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) hIcon ); /* Set Task List Icon */ } - pInfo->pResult = hb_itemPutNInt( pInfo->pResult, ( UINT_PTR ) hIcon ); + pInfo->pResult = hb_itemPutNInt( pInfo->pResult, ( HB_LONG ) hIcon ); break; } case HB_GTI_VIEWMAXWIDTH: @@ -2186,7 +2186,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bResizable ) { -#if defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) && !defined(HB_ARCH_64BIT) +#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT) LONG style; #else LONG_PTR style; @@ -2199,7 +2199,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) else style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_BORDER; -#if defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) && !defined(HB_ARCH_64BIT) +#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT) SetWindowLong( pWVT->hWnd, GWL_STYLE, style ); #else SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, style ); diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index fb1974c87a..95746979b4 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -9780,7 +9780,7 @@ void hb_vmForceLink( void ) #undef HB_FORCE_LINK_MAIN #if defined(HB_OS_WIN_32) && !defined(__EXPORT__) && \ - ( defined(__WATCOMC__) || defined(__MINGW32__) ) + ( defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW32__) ) # define HB_FORCE_LINK_MAIN hb_forceLinkMainWin diff --git a/harbour/source/vm/mainwin.c b/harbour/source/vm/mainwin.c index 3f7bfdeba5..89d2a7b680 100644 --- a/harbour/source/vm/mainwin.c +++ b/harbour/source/vm/mainwin.c @@ -60,7 +60,7 @@ #define HB_VM_STARTUP #include "hbwmain.c" -#if ( defined(__WATCOMC__) || defined(__MINGW32__) ) && !defined(__EXPORT__) +#if ( defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW32__) ) && !defined(__EXPORT__) HB_EXTERN_BEGIN HB_EXPORT void hb_forceLinkMainWin( void ) {} HB_EXTERN_END