From d1008fe5a034e9bebaba0dd48544d1cf8ac69ce5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 17 Sep 2009 10:36:52 +0000 Subject: [PATCH] 2009-09-17 12:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) - bin/pack_src.sh + mpkg_src.sh * Moved and renamed to align with rest of pkg creation scripts. (this should also go to package dir once in the future) * source/common/hbver.c * Converted decimal version numbers to hex in BCC guards. + Added BCC version detections for old (pre-5.x) versions. (Borrowed from xhb/Miguel Angel Marchuet) --- harbour/ChangeLog | 11 +++++++++++ harbour/{bin/pack_src.sh => mpkg_src.sh} | 0 harbour/source/common/hbver.c | 20 ++++++++++++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) rename harbour/{bin/pack_src.sh => mpkg_src.sh} (100%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 945272ba14..b06fc34fc8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-17 12:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + - bin/pack_src.sh + + mpkg_src.sh + * Moved and renamed to align with rest of pkg creation scripts. + (this should also go to package dir once in the future) + + * source/common/hbver.c + * Converted decimal version numbers to hex in BCC guards. + + Added BCC version detections for old (pre-5.x) versions. + (Borrowed from xhb/Miguel Angel Marchuet) + 2009-09-17 11:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added darwin/clang to compatibility matrix. diff --git a/harbour/bin/pack_src.sh b/harbour/mpkg_src.sh similarity index 100% rename from harbour/bin/pack_src.sh rename to harbour/mpkg_src.sh diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index a274b5ded6..54de01a034 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -536,8 +536,8 @@ char * hb_verCompiler( void ) #elif defined( __BORLANDC__ ) - #if ( __BORLANDC__ >= 1424 ) /* Version 5.9 */ - #if ( __BORLANDC__ >= 1568 ) /* Version 6.2 */ + #if ( __BORLANDC__ >= 0x0590 ) /* Version 5.9 */ + #if ( __BORLANDC__ >= 0x0620 ) /* Version 6.2 */ pszName = "Borland/Embarcadero C++"; #else pszName = "Borland/CodeGear C++"; @@ -545,11 +545,23 @@ char * hb_verCompiler( void ) #else pszName = "Borland C++"; #endif - #if ( __BORLANDC__ == 1040 ) /* Version 3.1 */ + #if ( __BORLANDC__ == 0x0400 ) /* Version 3.0 */ + iVerMajor = 3; + iVerMinor = 0; + iVerPatch = 0; + #elif ( __BORLANDC__ == 0x0410 ) /* Version 3.1 */ iVerMajor = 3; iVerMinor = 1; iVerPatch = 0; - #elif ( __BORLANDC__ >= 1280 ) /* Version 5.x */ + #elif ( __BORLANDC__ == 0x0452 ) /* Version 4.0 */ + iVerMajor = 4; + iVerMinor = 0; + iVerPatch = 0; + #elif ( __BORLANDC__ == 0x0460 ) /* Version 4.5 */ + iVerMajor = 4; + iVerMinor = 5; + iVerPatch = 0; + #elif ( __BORLANDC__ >= 0x0500 ) /* Version 5.x */ iVerMajor = __BORLANDC__ >> 8; iVerMinor = ( __BORLANDC__ & 0xFF ) >> 4; iVerPatch = __BORLANDC__ & 0xF;