diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f96350df03..36d86631f8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-14 10:55 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * utils/hbmk2/hbmk2.prg + ! Fixed regression causing -o not to work in -hbcmp mode. + (bug introd in the compile/link phase switch) + + Added support for -o in -hbcmp mode for pocc compilers. + + Added support for -o in -hbcmp mode for owatcom compilers. + ; Please test. + + * contrib/rddads/rddads.h + - Deleted some commented lines targeting compatibility with + some now forgotten macros. + 2009-05-14 08:56 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/rddads/ads1.c * re-enabled workaround code for wrong character field size returned by diff --git a/harbour/contrib/rddads/rddads.h b/harbour/contrib/rddads/rddads.h index c1aacd024c..e38aa0be35 100644 --- a/harbour/contrib/rddads/rddads.h +++ b/harbour/contrib/rddads/rddads.h @@ -88,27 +88,6 @@ #define _ADS_LIB_VERSION 500 #endif -#if 0 -/* Compatibility ACE version override. - Usage is discouraged and unnecessary unless we want to - override autodetection. For the latter, ADS_LIB_VERSION - is recommended. If ADS_LIB_VERSION is #defined, - ADS_REQUIRE_VERSION will be ignored. [vszakats] */ -#if !defined( ADS_LIB_VERSION ) - #if ADS_REQUIRE_VERSION == 5 - #define ADS_LIB_VERSION 500 - #elif ADS_REQUIRE_VERSION == 6 - #define ADS_LIB_VERSION 600 - #elif ADS_REQUIRE_VERSION == 7 - #define ADS_LIB_VERSION 700 - #elif ADS_REQUIRE_VERSION == 8 - #define ADS_LIB_VERSION 810 - #elif ADS_REQUIRE_VERSION == 9 - #define ADS_LIB_VERSION 900 - #endif -#endif -#endif - /* Make sure to not allow a manual override requesting a higher version than the one of ACE. [vszakats] */ #if !defined( ADS_LIB_VERSION ) diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index b069d0d086..a6cfc80ce9 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1500,6 +1500,21 @@ FUNCTION hbmk( aArgs ) RETURN 4 ENDIF + /* Decide about output name */ + IF ! lStopAfterInit .AND. ! lStopAfterHarbour + + /* If -o with full name wasn't specified, let's + make it the first source file specified. */ + DEFAULT s_cPROGNAME TO FN_NameGet( s_cFIRST ) + + /* Combine output dir with output name. */ + IF ! Empty( s_cPROGDIR ) + hb_FNameSplit( s_cPROGNAME, @cDir, @cName, @cExt ) + s_cPROGNAME := hb_FNameMerge( iif( Empty( cDir ), s_cPROGDIR, cDir ), cName, cExt ) + ENDIF + ENDIF + + /* Decide about working dir */ IF ! lStopAfterInit IF hbmk[ _HBMK_lINC ] IF cWorkDir == NIL @@ -1515,21 +1530,6 @@ FUNCTION hbmk( aArgs ) ENDIF ENDIF - /* Decide about output name */ - - IF ! lStopAfterInit .AND. ! lStopAfterHarbour - - /* If -o with full name wasn't specified, let's - make it the first source file specified. */ - DEFAULT s_cPROGNAME TO FN_NameGet( s_cFIRST ) - - /* Combine output dir with output name. */ - IF ! Empty( s_cPROGDIR ) - hb_FNameSplit( s_cPROGNAME, @cDir, @cName, @cExt ) - s_cPROGNAME := hb_FNameMerge( iif( Empty( cDir ), s_cPROGDIR, cDir ), cName, cExt ) - ENDIF - ENDIF - IF ! lStopAfterInit .AND. ! lStopAfterHarbour IF hbmk[ _HBMK_cGT ] == hbmk[ _HBMK_cGTDEFAULT ] @@ -1688,9 +1688,9 @@ FUNCTION hbmk( aArgs ) IF lStopAfterCComp IF ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( s_aPRG ) + Len( s_aC ) ) == 1 IF hbmk[ _HBMK_cARCH ] == "darwin" - AAdd( hbmk[ _HBMK_aOPTL ], "-o {OO}" ) + AAdd( hbmk[ _HBMK_aOPTC ], "-o {OO}" ) ELSE - AAdd( hbmk[ _HBMK_aOPTL ], "-o{OO}" ) + AAdd( hbmk[ _HBMK_aOPTC ], "-o{OO}" ) ENDIF ENDIF ELSE @@ -1841,7 +1841,7 @@ FUNCTION hbmk( aArgs ) ENDIF IF lStopAfterCComp IF ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( s_aPRG ) + Len( s_aC ) ) == 1 - AAdd( hbmk[ _HBMK_aOPTL ], "-o{OO}" ) + AAdd( hbmk[ _HBMK_aOPTC ], "-o{OO}" ) ENDIF ELSE AAdd( hbmk[ _HBMK_aOPTL ], "-o{OE}" ) @@ -1914,7 +1914,7 @@ FUNCTION hbmk( aArgs ) /* OS/2 needs a space between -o and file name following it */ IF lStopAfterCComp IF ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( s_aPRG ) + Len( s_aC ) ) == 1 - AAdd( hbmk[ _HBMK_aOPTL ], "-o {OO}" ) + AAdd( hbmk[ _HBMK_aOPTC ], "-o {OO}" ) ENDIF ELSE AAdd( hbmk[ _HBMK_aOPTL ], "-o {OE}" ) @@ -1959,7 +1959,7 @@ FUNCTION hbmk( aArgs ) ENDIF IF lStopAfterCComp IF ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( s_aPRG ) + Len( s_aC ) ) == 1 - AAdd( hbmk[ _HBMK_aOPTL ], "-o{OO}" ) + AAdd( hbmk[ _HBMK_aOPTC ], "-o{OO}" ) ENDIF ELSE AAdd( hbmk[ _HBMK_aOPTL ], "-o{OE}" ) @@ -1995,6 +1995,13 @@ FUNCTION hbmk( aArgs ) ELSE cOpt_CompC += " {LC}" ENDIF + IF lStopAfterCComp .AND. ! lCreateLib .AND. ! lCreateDyn + IF ( Len( s_aPRG ) + Len( s_aC ) ) == 1 + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OO}" ) + ELSE + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OD}" ) + ENDIF + ENDIF cBin_Link := "wlink.exe" cOpt_Link := "SYS causeway {FL} NAME {OE} {LO} {DL} {LL}{SCRIPT}" cBin_Lib := "wlib.exe" @@ -2040,6 +2047,13 @@ FUNCTION hbmk( aArgs ) ELSE cOpt_CompC += " {LC}" ENDIF + IF lStopAfterCComp .AND. ! lCreateLib .AND. ! lCreateDyn + IF ( Len( s_aPRG ) + Len( s_aC ) ) == 1 + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OO}" ) + ELSE + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OD}" ) + ENDIF + ENDIF cBin_Link := "wlink.exe" cOpt_Link := "{FL} NAME {OE} {LO} {DL} {LL} {LS}{SCRIPT}" cBin_Lib := "wlib.exe" @@ -2109,6 +2123,13 @@ FUNCTION hbmk( aArgs ) ELSE cOpt_CompC += " {LC}" ENDIF + IF lStopAfterCComp .AND. ! lCreateLib .AND. ! lCreateDyn + IF ( Len( s_aPRG ) + Len( s_aC ) ) == 1 + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OO}" ) + ELSE + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OD}" ) + ENDIF + ENDIF cBin_Link := "wlink.exe" cOpt_Link := "{FL} NAME {OE} {LO} {DL} {LL}{SCRIPT}" cBin_Lib := "wlib.exe" @@ -2155,6 +2176,13 @@ FUNCTION hbmk( aArgs ) ELSE cOpt_CompC += " {LC}" ENDIF + IF lStopAfterCComp .AND. ! lCreateLib .AND. ! lCreateDyn + IF ( Len( s_aPRG ) + Len( s_aC ) ) == 1 + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OO}" ) + ELSE + AAdd( hbmk[ _HBMK_aOPTC ], "-fo={OD}" ) + ENDIF + ENDIF cBin_Link := "wlink" cOpt_Link := "SYS LINUX {FL} NAME {OE} {LO} {DL} {LL}{SCRIPT}" cBin_Lib := "wlib" @@ -2400,7 +2428,12 @@ FUNCTION hbmk( aArgs ) cBin_Res := "porc.exe" ENDIF cBin_Dyn := cBin_Link - cOpt_CompC := "/c /Ze /Go {FC} {IC} /Fo{OO}" + cOpt_CompC := "/c /Ze /Go {FC}" + IF lStopAfterCComp .AND. ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( s_aPRG ) + Len( s_aC ) ) == 1 + cOpt_CompC += " {LC} /Fo{OO}" + ELSE + cOpt_CompC += " {IC}" + ENDIF cOptIncMask := "/I{DI}" cOpt_Dyn := "{FD} /dll /out:{OD} {DL} {LO} {LL} {LS}" DO CASE @@ -2424,10 +2457,12 @@ FUNCTION hbmk( aArgs ) IF hbmk[ _HBMK_lMT ] AAdd( hbmk[ _HBMK_aOPTC ], "/MT" ) ENDIF - IF !( lStopAfterCComp .AND. ! lCreateLib .AND. ! lCreateDyn ) - AAdd( hbmk[ _HBMK_aOPTL ], "/out:{OE}" ) + IF hbmk[ _HBMK_lINC ] + IF ! Empty( cWorkDir ) + AAdd( hbmk[ _HBMK_aOPTC ], "/Fo{OO}" ) + ENDIF ENDIF - cOpt_Link := "{LO} {DL} {FL} {LL} {LS}" + cOpt_Link := "/out:{OE} {LO} {DL} {FL} {LL} {LS}" cLibPathPrefix := "/libpath:" cLibPathSep := " " IF hbmk[ _HBMK_lSHARED ] @@ -2715,9 +2750,12 @@ FUNCTION hbmk( aArgs ) "LNK4217: locally defined symbol ... imported in function ..." if using 'dllimport'. [vszakats] */ tmp := "" - CASE hbmk[ _HBMK_cCOMP ] $ "gcc|mingw|mingw64|mingwarm|cygwin" ; tmp := "__attribute__ (( dllimport ))" - CASE hbmk[ _HBMK_cCOMP ] $ "bcc|owatcom" ; tmp := "__declspec( dllimport )" - OTHERWISE ; tmp := "_declspec( dllimport )" + CASE hbmk[ _HBMK_cCOMP ] $ "gcc|mingw|mingw64|mingwarm|cygwin" + tmp := "__attribute__ (( dllimport ))" + CASE hbmk[ _HBMK_cCOMP ] $ "bcc|owatcom" + tmp := "__declspec( dllimport )" + OTHERWISE + tmp := "_declspec( dllimport )" ENDCASE /* Create list of requested symbols */