From d489f82e6d6316433562005aaa446c5a32e03d59 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 27 Apr 2008 20:45:18 +0000 Subject: [PATCH] 2008-04-27 22:42 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/common/hbver.c + OS(), hb_verPlatform(): Added detection of Windows Server 2008. * source/rtl/tobject.prg ! XPP feature guarded with HB_COMPAT_XPP --- harbour/ChangeLog | 7 +++++++ harbour/source/common/hbver.c | 18 ++++++++++++++++-- harbour/source/rtl/tobject.prg | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bcc98301b9..45c17e6998 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,13 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-04-27 22:42 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * source/common/hbver.c + + OS(), hb_verPlatform(): Added detection of Windows Server 2008. + + * source/rtl/tobject.prg + ! XPP feature guarded with HB_COMPAT_XPP + 2008-04-26 07:53 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/rtl/tget.prg ! Fixed to not extend ::left(), ::right(), ::backspace(), diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index 72da3894b7..f084c91c8f 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -222,9 +222,23 @@ char * hb_verPlatform( void ) case VER_PLATFORM_WIN32_NT: if( osVer.dwMajorVersion == 6 ) - pszName = "Windows Vista"; + { + OSVERSIONINFOEXA osVerEx; + + osVerEx.dwOSVersionInfoSize = sizeof( osVerEx ); + + if( GetVersionExA( &osVerEx ) ) + { + if( osVerEx.wProductType == VER_NT_SERVER || osVerEx.wProductType == VER_NT_DOMAIN_CONTROLLER ) + pszName = "Windows Server 2008"; + else /* VER_NT_WORKSTATION */ + pszName = "Windows Vista"; + } + else + pszName = "Windows"; + } else if( osVer.dwMajorVersion == 5 && osVer.dwMinorVersion >= 2 ) - pszName = "Windows 2003"; + pszName = "Windows Server 2003"; else if( osVer.dwMajorVersion == 5 && osVer.dwMinorVersion == 1 ) pszName = "Windows XP"; else if( osVer.dwMajorVersion == 5 ) diff --git a/harbour/source/rtl/tobject.prg b/harbour/source/rtl/tobject.prg index a4ecfc8c67..613f273f6a 100644 --- a/harbour/source/rtl/tobject.prg +++ b/harbour/source/rtl/tobject.prg @@ -89,7 +89,9 @@ FUNCTION HBObject() /*s_oClass:AddInline( "EVAL" , {| Self | __EVAL( Self ) }, HB_OO_CLSTP_EXPORTED ) */ /* xBase++ */ +#ifdef HB_COMPAT_XPP s_oClass:AddInline( "ISDERIVEDFROM" , {| Self, xPar1 | __ObjDerivedFrom( Self, xPar1 ) }, HB_OO_CLSTP_EXPORTED ) +#endif /* Class(y) */ s_oClass:AddInline( "ISKINDOF" , {| Self, xPar1 | __ObjDerivedFrom( Self, xPar1 ) }, HB_OO_CLSTP_EXPORTED )