diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4190c098e3..4133b71501 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-07-05 02:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/pp/hbpp.c + * source/pp/ppcore.c + * source/pp/pplib.c + ! Fixed bug introduced in r8836, so that now __HARBOUR__ + will again be #defined when 'harbour /u' switch is used. + Thanks Randy. + 2008-07-05 01:59 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbver.h ! Typo in comment. diff --git a/harbour/source/pp/hbpp.c b/harbour/source/pp/hbpp.c index 4ebc582c71..cfe9d802a3 100644 --- a/harbour/source/pp/hbpp.c +++ b/harbour/source/pp/hbpp.c @@ -236,7 +236,8 @@ static void hb_pp_undefCompilerRules( PHB_PP_STATE pState ) { int i; PHB_PP_RULE * pRulePtr, pRule; - char * szRules[] = { "__DATE__", + char * szRules[] = { "__HARBOUR__", + "__DATE__", "__TIME__", "__HB_MAIN__", "__ARCH16BIT__", diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index e9af129095..b2db968f74 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -5221,6 +5221,11 @@ void hb_pp_initDynDefines( PHB_PP_STATE pState ) hb_pp_addDefine( pState, szDefine, szResult ); #endif +#if defined( __HARBOUR__ ) + snprintf( szResult, sizeof( szResult ), "0x%02X%02X%02X", HB_VER_MAJOR & 0xFF, HB_VER_MINOR & 0xFF, HB_VER_REVISION & 0xFF ); + hb_pp_addDefine( pState, "__HARBOUR__", szResult ); +#endif + /* __DATE__ */ hb_dateToday( &iYear, &iMonth, &iDay ); hb_dateStrPut( szResult + 1, iYear, iMonth, iDay ); diff --git a/harbour/source/pp/pplib.c b/harbour/source/pp/pplib.c index 68c30aa8b1..a25e49be2e 100644 --- a/harbour/source/pp/pplib.c +++ b/harbour/source/pp/pplib.c @@ -134,7 +134,7 @@ PHB_PP_STATE hb_pp_Param( int iParam ) * initialize new PP context and return pointer to it. * __PP_INIT( [] [, ] ) * when is empty string ("") then no default rules are used - * only the dynamically created #defines like __DATE__, __TIME__ + * only the dynamically created #defines like __HARBOUR__, __DATE__, __TIME__ */ HB_FUNC( __PP_INIT ) {