diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 001869ce92..ce733d4591 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,32 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-30 19:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/xhb/hbcompat.ch + * contrib/xhb/xhbfs.c + ! Deleted FILESIZE(). It's not an xhb compatibility function, + but one offered as part of CT lib in xhb, and HBCT in Harbour. + + * src/common/hbver.c + + Added compiler version detection for clang 2.x (and newer) + Patch by Tamas Tevesz. + + * INSTALL + * Minor. + + * config/bsd/clang.mk + * config/linux/clang.mk + + Clearing forced C++ mode if clang 1.x is detected. + (Patch from Tamas Tevesz. Slight fix added by me to + set HB_CMP when falling back to C mode. I didn't make + tests though.) + ; NOTE: Probably HB_BUILD_MODE=c should be export-ed + to avoid double evaluation. Pls test it. + + * config/postinst.prg + * config/ren_sfn.prg + + Raised warning level to 3. + 2010-05-29 18:50 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/generator/hbqtgen.prg ! A minor fix, no effect on sources. @@ -43,19 +69,19 @@ * contrib/hbide/ideshortcuts.prg + Implemented: selection "persistancy" controllable programatically" - Ctrl+F11 is designated for this task. A slot in "Keyboard Mappings" - is also provided. By default persistant selection is disabled and - hence behaves exectly like it was before persistancy and more natural - like other editors. Ctrl+F11 toggles it on/off and if switched on, + Ctrl+F11 is designated for this task. A slot in "Keyboard Mappings" + is also provided. By default persistant selection is disabled and + hence behaves exectly like it was before persistancy and more natural + like other editors. Ctrl+F11 toggles it on/off and if switched on, behaviour will follow the implemenation just before this commit. - If selection mode is activated programatically, behavior remains + If selection mode is activated programatically, behavior remains the same as before. Please test, bumps are expected. % Some major artifacts how cursor should behave after paste, etc. - + Implemented: document writer is now capable to pulls the existing - help body and correctly reinstates the changes. This implies that - for your sources help it can be used in real-time. Please test + + Implemented: document writer is now capable to pulls the existing + help body and correctly reinstates the changes. This implies that + for your sources help it can be used in real-time. Please test and post if you find difficulties. TODO: the same behavior with disk files. diff --git a/harbour/INSTALL b/harbour/INSTALL index 7115b922e0..2b4e6c61bc 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -735,8 +735,8 @@ HARBOUR 8. EXAMPLES =========== - for Windows hosts (x86, 32-bit) - ----------------- + for Windows (x86, 32-bit) hosts + ------------------------------- NOTES: - All code below should be copied to batch files or typed at command line. diff --git a/harbour/config/bsd/clang.mk b/harbour/config/bsd/clang.mk index e337aff41c..bd36fd597a 100644 --- a/harbour/config/bsd/clang.mk +++ b/harbour/config/bsd/clang.mk @@ -3,8 +3,13 @@ # ifeq ($(HB_BUILD_MODE),cpp) - # -ccc-clang-cxx - HB_CMP := clang + ifneq ($(findstring clang$(subst x, ,x)version$(subst x, ,x)1,$(shell clang --version)),) + HB_BUILD_MODE := c + endif +endif + +ifeq ($(HB_BUILD_MODE),cpp) + HB_CMP := clang++ else HB_CMP := clang endif diff --git a/harbour/config/linux/clang.mk b/harbour/config/linux/clang.mk index b501b651b2..385a0057ba 100644 --- a/harbour/config/linux/clang.mk +++ b/harbour/config/linux/clang.mk @@ -3,8 +3,13 @@ # ifeq ($(HB_BUILD_MODE),cpp) - # -ccc-clang-cxx - HB_CMP := clang + ifneq ($(findstring clang$(subst x, ,x)version$(subst x, ,x)1,$(shell clang --version)),) + HB_BUILD_MODE := c + endif +endif + +ifeq ($(HB_BUILD_MODE),cpp) + HB_CMP := clang++ else HB_CMP := clang endif diff --git a/harbour/config/postinst.prg b/harbour/config/postinst.prg index 52ab0be24c..721773ad01 100644 --- a/harbour/config/postinst.prg +++ b/harbour/config/postinst.prg @@ -7,6 +7,8 @@ * See COPYING for licensing terms. */ +#pragma warninglevel=3 + /* TOFIX: Ugly hack to avoid #include "directry.ch" */ #define F_NAME 1 /* File name */ #define F_ATTR 5 /* File attribute */ diff --git a/harbour/config/ren_sfn.prg b/harbour/config/ren_sfn.prg index 520b3f7745..2043f19397 100644 --- a/harbour/config/ren_sfn.prg +++ b/harbour/config/ren_sfn.prg @@ -18,6 +18,8 @@ don't have to mess with it. */ +#pragma warninglevel=3 + PROCEDURE Main( cMode ) LOCAL files := {} LOCAL cFile := MemoRead( "ren_sfn.txt" ) diff --git a/harbour/contrib/xhb/hbcompat.ch b/harbour/contrib/xhb/hbcompat.ch index cb9b58ace5..1b3e4803e1 100644 --- a/harbour/contrib/xhb/hbcompat.ch +++ b/harbour/contrib/xhb/hbcompat.ch @@ -345,7 +345,6 @@ #xtranslate ValToPrgExp([]) => hb_valToExp() #xtranslate IsDirectory() => hb_dirExists() #xtranslate SecondsSleep([]) => hb_idleSleep() - #xtranslate FileSize() => hb_FSize() #xtranslate WildMatch([]) => hb_WildMatch() #xtranslate hb_DeserialNext() => hb_Deserialize() #xtranslate hb_funcptr() => __dynsn2sym() diff --git a/harbour/contrib/xhb/xhbfs.c b/harbour/contrib/xhb/xhbfs.c index 6c9e3c8e1d..38216ea824 100644 --- a/harbour/contrib/xhb/xhbfs.c +++ b/harbour/contrib/xhb/xhbfs.c @@ -53,5 +53,4 @@ #include "hbapi.h" HB_FUNC_EXTERN( HB_DIREXISTS ) ; HB_FUNC( ISDIRECTORY ) { HB_FUNC_EXEC( HB_DIREXISTS ); } -HB_FUNC_EXTERN( HB_FSIZE ) ; HB_FUNC( FILESIZE ) { HB_FUNC_EXEC( HB_FSIZE ); } HB_FUNC_EXTERN( HB_DISABLEWAITLOCKS ) ; HB_FUNC( DISABLEWAITLOCKS ) { HB_FUNC_EXEC( HB_DISABLEWAITLOCKS ); } diff --git a/harbour/src/common/hbver.c b/harbour/src/common/hbver.c index f1ac503eb7..2e436e9dfe 100644 --- a/harbour/src/common/hbver.c +++ b/harbour/src/common/hbver.c @@ -700,6 +700,18 @@ char * hb_verCompiler( void ) iVerPatch = 0; #endif +#elif defined( __llvm__ ) && defined( __clang_major__ ) + + pszName = "LLVM/Clang C"; + + iVerMajor = __clang_major__; + iVerMinor = __clang_minor__; + iVerPatch = __clang_patchlevel__; + + #if defined( __cplusplus ) + hb_strncpy( szSub, "++", sizeof( szSub ) - 1 ); + #endif + #elif defined( __GNUC__ ) #if defined( __DJGPP__ ) @@ -783,6 +795,15 @@ char * hb_verCompiler( void ) else hb_strncpy( pszCompiler, "(unknown)", COMPILER_BUF_SIZE - 1 ); +#if defined( __clang_version__ ) + if (strstr( __clang_version__, "(")) + /* "2.0 (trunk 103176)" -> "(trunk 103176)" */ + hb_snprintf( szSub, sizeof( szSub ), " %s", strstr( __clang_version__, "(")); + else + hb_snprintf( szSub, sizeof( szSub ), " (%s)", __clang_version__); + hb_strncat( pszCompiler, szSub, COMPILER_BUF_SIZE - 1 ); +#endif + #if defined( __DJGPP__ ) hb_snprintf( szSub, sizeof( szSub ), " (DJGPP %i.%02i)", ( int ) __DJGPP__, ( int ) __DJGPP_MINOR__ ); hb_strncat( pszCompiler, szSub, COMPILER_BUF_SIZE - 1 );