i think this takes care of sunpros >=0x5100 (studio 12).
have no earlier ones readily installed, but they should stay ok.
Index: src/common/hbver.c
===================================================================
--- src/common/hbver.c (revision 14628)
+++ src/common/hbver.c (working copy)
@@ -739,30 +739,29 @@
#elif defined( __SUNPRO_C )
pszName = "Sun C";
- #if __SUNPRO_C < 0x600
+ #if __SUNPRO_C < 0x1000
iVerMajor = __SUNPRO_C / 0x100;
iVerMinor = ( __SUNPRO_C & 0xff ) / 0x10;
iVerPatch = __SUNPRO_C & 0xf;
#else
- /* Until someone at Sun somes up with a reliable way of identifying
- Sun Studio releases >= about 11. */
- iVerMajor = iVerMinor = iVerPatch = 0;
- hb_snprintf( szSub, sizeof( szSub ) - 1, " (ident 0x%X)", __SUNPRO_C );
+ iVerMajor = __SUNPRO_C / 0x1000;
+ iVerMinor = __SUNPRO_C / 0x10 & 0xff;
+ iVerMinor = iVerMinor / 16 * 10 + iVerMinor % 16;
+ iVerPatch = __SUNPRO_C & 0xf;
#endif
#elif defined( __SUNPRO_CC )
pszName = "Sun C++";
- #if __SUNPRO_CC < 0x600
- pszName = "Sun C++";
+ #if __SUNPRO_CC < 0x1000
iVerMajor = __SUNPRO_CC / 0x100;
iVerMinor = ( __SUNPRO_CC & 0xff ) / 0x10;
iVerPatch = __SUNPRO_CC & 0xf;
#else
- /* Until someone at Sun somes up with a reliable way of identifying
- Sun Studio releases >= about 11. */
- iVerMajor = iVerMinor = iVerPatch = 0;
- hb_snprintf( szSub, sizeof( szSub ) - 1, " (ident 0x%X)", __SUNPRO_CC );
+ iVerMajor = __SUNPRO_CC / 0x1000;
+ iVerMinor = __SUNPRO_CC / 0x10 & 0xff;
+ iVerMinor = iVerMinor / 16 * 10 + iVerMinor % 16;
+ iVerPatch = __SUNPRO_CC & 0xf;
#endif
#else
--
[-]
mkdir /nonexistent
Index: src/common/hbver.c
===================================================================
--- src/common/hbver.c (revision 14628)
+++ src/common/hbver.c (working copy)
@@ -739,30 +739,29 @@
#elif defined( __SUNPRO_C )
pszName = "Sun C";
- #if __SUNPRO_C < 0x600
+ #if __SUNPRO_C < 0x1000
iVerMajor = __SUNPRO_C / 0x100;
iVerMinor = ( __SUNPRO_C & 0xff ) / 0x10;
iVerPatch = __SUNPRO_C & 0xf;
#else
- /* Until someone at Sun somes up with a reliable way of identifying
- Sun Studio releases >= about 11. */
- iVerMajor = iVerMinor = iVerPatch = 0;
- hb_snprintf( szSub, sizeof( szSub ) - 1, " (ident 0x%X)", __SUNPRO_C );
+ iVerMajor = __SUNPRO_C / 0x1000;
+ iVerMinor = __SUNPRO_C / 0x10 & 0xff;
+ iVerMinor = iVerMinor / 16 * 10 + iVerMinor % 16;
+ iVerPatch = __SUNPRO_C & 0xf;
#endif
#elif defined( __SUNPRO_CC )
pszName = "Sun C++";
- #if __SUNPRO_CC < 0x600
- pszName = "Sun C++";
+ #if __SUNPRO_CC < 0x1000
iVerMajor = __SUNPRO_CC / 0x100;
iVerMinor = ( __SUNPRO_CC & 0xff ) / 0x10;
iVerPatch = __SUNPRO_CC & 0xf;
#else
- /* Until someone at Sun somes up with a reliable way of identifying
- Sun Studio releases >= about 11. */
- iVerMajor = iVerMinor = iVerPatch = 0;
- hb_snprintf( szSub, sizeof( szSub ) - 1, " (ident 0x%X)", __SUNPRO_CC );
+ iVerMajor = __SUNPRO_CC / 0x1000;
+ iVerMinor = __SUNPRO_CC / 0x10 & 0xff;
+ iVerMinor = iVerMinor / 16 * 10 + iVerMinor % 16;
+ iVerPatch = __SUNPRO_CC & 0xf;
#endif
#else
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour