diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f1636e90c0..359222a0f8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,22 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-28 08:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * bin/hb-func.sh + ! Fixed recent mistake in gpm detection at postinst (now redundant) + dynlib generation phase. + + * source/rtl/fssize.c + ! Fixed warnings shown by mingw64 4.5.0. + + * config/detfun.mk + + Now accepting HB_WITH_* control variables in place of HB_INC_* once. + If HB_WITH_* is set it overrides HB_INC_*. Experimental yet. + * Minor in comments. + + * config/detect.mk + * Minor correction for conf.mk inclusion. + 2009-08-28 00:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/rules.mk * config/dos/djgpp.mk diff --git a/harbour/bin/hb-func.sh b/harbour/bin/hb-func.sh index a6f13cb6ad..02b4ce58d9 100755 --- a/harbour/bin/hb-func.sh +++ b/harbour/bin/hb-func.sh @@ -786,7 +786,7 @@ mk_hblibso() (cd $HB_LIB_INSTALL LIBS="" LIBSMT="" - gpm="${HB_INC_GPM}" + gpm="${HB_HAS_GPM}" linker_options="-lm" linker_mtoptions="" if [ "${HB_USER_CFLAGS//-DHB_PCRE_REGEX/}" != "${HB_USER_CFLAGS}" ]; then @@ -858,7 +858,7 @@ mk_hblibso() linker_options="$linker_options -L/usr/X11R6/lib64" linker_options="$linker_options -lX11" fi - if [ "${gpm}" != no ] && ( [ "${l}" = gtcrs ] || \ + if [ -n "${gpm}" ] && ( [ "${l}" = gtcrs ] || \ [ "${l}" = gtsln ] || [ "${l}" = gttrm ] ); then linker_options="$linker_options -lgpm" gpm="" diff --git a/harbour/config/detect.mk b/harbour/config/detect.mk index 7fdf92bcc1..84a921c203 100644 --- a/harbour/config/detect.mk +++ b/harbour/config/detect.mk @@ -24,10 +24,6 @@ export HB_HAS_SLANG := export HB_HAS_CURSES := export HB_HAS_X11 := -# Allow detection by external (generated) config file - --include $(TOP)$(ROOT)config/conf.mk - # Exclude Harbour-wide features prohibiting commercial use ifeq ($(HB_COMMERCE),yes) @@ -35,6 +31,10 @@ ifeq ($(HB_COMMERCE),yes) export HB_INC_SLANG := no endif +# Allow detection by external (generated) config file + +-include $(TOP)$(ROOT)config/conf.mk + # Detect OpenSSL _DET_DSP_NAME := openssl diff --git a/harbour/config/detfun.mk b/harbour/config/detfun.mk index 2fa51c0f8f..1ef986777c 100644 --- a/harbour/config/detfun.mk +++ b/harbour/config/detfun.mk @@ -13,8 +13,8 @@ # USAGE: # ON CALL: # _DET_DSP_NAME - human readable name of external component. -# _DET_VAR_INC_ - variable name containing user component control. -# _DET_VAR_HAS_ - variable name receiving detection result. +# _DET_VAR_INC_ - variable name containing user component control (typically "HB_INC_*"). +# _DET_VAR_HAS_ - variable name receiving detection result (typically "HB_HAS_*"). # _DET_FLT_PLAT - positive and negative platform filters. Prefix negative ones with '!' char. # _DET_FLT_COMP - positive and negative compiler filters. Prefix negative ones with '!' char. # _DET_INC_DEFP - default location to look at. Not effective in HB_XBUILD mode. @@ -33,13 +33,18 @@ # (empty) - we can't use this component # - component headers were found at these locations (typically one) -# Show verbose information (empty|yes|very) +# show verbose information (empty|yes|very) ifneq ($(_DET_OPT_VERB),) do_info = $(info ! Component: $(1)) else do_info = endif +# preparing switch to HB_WITH_* variables from HB_INC_* +ifneq ($($(subst HB_INC_,HB_WITH_,$(_DET_VAR_INC_))),) + $($(subst HB_INC_,HB_WITH_,$(_DET_VAR_INC_))) := $($(_DET_VAR_INC_)) +endif + _DET_RES_TEXT := ifeq ($($(_DET_VAR_HAS_)),) diff --git a/harbour/source/rtl/fssize.c b/harbour/source/rtl/fssize.c index 63ddefbe93..b79d27f8d8 100644 --- a/harbour/source/rtl/fssize.c +++ b/harbour/source/rtl/fssize.c @@ -101,6 +101,7 @@ HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry ) BOOL fResult; struct stat64 statbuf; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); + statbuf.st_size = 0; hb_vmUnlock(); fResult = stat64( pszFileName, &statbuf ) == 0; hb_fsSetIOError( fResult, 0 ); @@ -114,6 +115,7 @@ HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry ) BOOL fResult; struct stat statbuf; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); + statbuf.st_size = 0; hb_vmUnlock(); fResult = stat( ( char * ) pszFileName, &statbuf ) == 0; hb_fsSetIOError( fResult, 0 );