2009-09-24 13:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* utils/hbmk2/hbmk2.prg
    % Using -undef:.ARCH.
    ! Fixed all potential unused tmp3 errors.

  * config/global.mk
    % Using -undef:.ARCH.
This commit is contained in:
Viktor Szakats
2009-09-24 11:52:43 +00:00
parent 7f5400d2ba
commit e70086da86
3 changed files with 22 additions and 43 deletions

View File

@@ -17,6 +17,14 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-09-24 13:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
% Using -undef:.ARCH.
! Fixed all potential unused tmp3 errors.
* config/global.mk
% Using -undef:.ARCH.
2009-09-24 13:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
* modified some internal structure definitions (used nameless unions)

View File

@@ -1036,34 +1036,7 @@ ifneq ($(HB_HOST_PLAT)$(HB_HOST_CPU),$(HB_PLATFORM)$(HB_CPU))
endif
ifeq ($(HB_CROSS_BUILD),yes)
# Setup platform macros (undefine host, define target)
ifeq ($(HB_HOST_PLAT),win)
HB_PRGFLAGS += -undef:__PLATFORM__WINDOWS
# We only need this to avoid problems with using Cygwin binaries as native ones.
HB_PRGFLAGS += -undef:__PLATFORM__UNIX
else ifeq ($(HB_HOST_PLAT),dos)
HB_PRGFLAGS += -undef:__PLATFORM__DOS
else ifeq ($(HB_HOST_PLAT),os2)
HB_PRGFLAGS += -undef:__PLATFORM__OS2
else ifeq ($(HB_HOST_PLAT),linux)
HB_PRGFLAGS += -undef:__PLATFORM__LINUX -undef:__PLATFORM__UNIX
else ifeq ($(HB_HOST_PLAT),darwin)
HB_PRGFLAGS += -undef:__PLATFORM__DARWIN -undef:__PLATFORM__UNIX
else ifeq ($(HB_HOST_PLAT),bsd)
HB_PRGFLAGS += -undef:__PLATFORM__BSD -undef:__PLATFORM__UNIX
else ifeq ($(HB_HOST_PLAT),sunos)
HB_PRGFLAGS += -undef:__PLATFORM__SUNOS -undef:__PLATFORM__UNIX
else ifeq ($(HB_HOST_PLAT),hpux)
HB_PRGFLAGS += -undef:__PLATFORM__HPUX -undef:__PLATFORM__UNIX
else ifeq ($(HB_HOST_PLAT),beos)
HB_PRGFLAGS += -undef:__PLATFORM__BEOS -undef:__PLATFORM__UNIX
endif
ifneq ($(HB_HOST_CPU),$(HB_CPU))
ifneq ($(filter $(HB_HOST_CPU),x86 arm),)
HB_PRGFLAGS += -D__ARCH32BIT__
else ifneq ($(filter $(HB_HOST_CPU),x86_64 ia64),)
HB_PRGFLAGS += -D__ARCH64BIT__
endif
endif
HB_PRGFLAGS += -undef:.ARCH.
ifeq ($(HB_PLATFORM),win)
HB_PRGFLAGS += -D__PLATFORM__WINDOWS
else ifeq ($(HB_PLATFORM),wce)

View File

@@ -607,10 +607,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
LOCAL cBin_Dyn
LOCAL cPath_CompC
LOCAL nErrorLevel := 0
LOCAL tmp, tmp1, tmp2, array
#if defined( __PLATFORM__UNIX )
LOCAL tmp3
#endif
LOCAL tmp, tmp1, tmp2, tmp3, array
LOCAL cScriptFile
LOCAL fhnd
LOCAL cFile
@@ -1102,6 +1099,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
#if defined( __PLATFORM__WINDOWS )
tmp3 := NIL; HB_SYMBOL_UNUSED( tmp3 )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingw" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "win" , "mingw" , "" , NIL, NIL } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingw64" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "win" , "mingw64" , "x86_64-w64-mingw32-" , NIL, NIL } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingwarm" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "wce" , "mingwarm", "arm-mingw32ce-" , NIL, NIL } )
@@ -1118,6 +1117,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
#elif defined( __PLATFORM__DOS )
tmp3 := NIL; HB_SYMBOL_UNUSED( tmp3 )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "djgpp" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc.exe" ), tmp1, NIL ) }, "dos" , "djgpp" , "" , NIL, {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binw" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "dos" , "watcom" , "" , NIL, {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binw" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "win" , "watcom" , "" , NIL, {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
@@ -1126,6 +1127,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
#elif defined( __PLATFORM__OS2 )
tmp3 := NIL; HB_SYMBOL_UNUSED( tmp3 )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "os2" , "watcom" , "" , NIL, {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "win" , "watcom" , "" , NIL, {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "dos" , "watcom" , "" , NIL, {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
@@ -6065,11 +6068,11 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
aUnd := {}
aDef := {}
AAdd( aUnd, ".ARCH." )
IF hbmk[ _HBMK_nHBMODE ] == _HBMODE_XHB
#if defined( __PLATFORM__WINDOWS )
AAdd( aUnd, "__PLATFORM__WINDOWS" )
IF hbmk[ _HBMK_nHBMODE ] == _HBMODE_XHB
AAdd( aUnd, "__PLATFORM__Windows" )
ENDIF
AAdd( aUnd, "__PLATFORM__Windows" )
#if defined( __PLATFORM__WINCE )
AAdd( aUnd, "__PLATFORM__WINCE" )
#endif
@@ -6082,10 +6085,7 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
#elif defined( __PLATFORM__OS2 )
AAdd( aUnd, "__PLATFORM__OS2" )
#elif defined( __PLATFORM__LINUX )
IF hbmk[ _HBMK_nHBMODE ] == _HBMODE_XHB
AAdd( aUnd, "__PLATFORM__Linux" )
ENDIF
AAdd( aUnd, "__PLATFORM__LINUX" )
AAdd( aUnd, "__PLATFORM__Linux" )
AAdd( aUnd, "__PLATFORM__UNIX" )
#elif defined( __PLATFORM__DARWIN )
AAdd( aUnd, "__PLATFORM__DARWIN" )
@@ -6099,9 +6099,6 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
#elif defined( __PLATFORM__HPUX )
AAdd( aUnd, "__PLATFORM__HPUX" )
AAdd( aUnd, "__PLATFORM__UNIX" )
#elif defined( __PLATFORM__BEOS )
AAdd( aUnd, "__PLATFORM__BEOS" )
AAdd( aUnd, "__PLATFORM__UNIX" )
#endif
#if defined( __ARCH16BIT__ )
@@ -6119,6 +6116,7 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
#elif defined( __PDP_ENDIAN__ )
AAdd( aUnd, "__PDP_ENDIAN__" )
#endif
ENDIF
DO CASE
CASE hbmk[ _HBMK_cPLAT ] == "wce"