diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9e13f95d1b..349b4df8d7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-29 09:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/common/hbver.c + + Now able to distinguish between XP x64 and Server 2003. + + Now able to distinguish between Server 2003 and Server 2003 R2 + (borrowed from Peter Rees/xhb, with typo fixed) + (please test on these platforms) + + * ChangeLog + + Marked some changes as [DONE]. + 2010-04-29 08:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_osc.c + Added WIN_OSISWINXPORLATER(). Following Peter Rees in xhb. @@ -48,7 +58,7 @@ + contrib/xhb/tests/test.xml + Added xml test code posted to list by "Ivan re". (after fix and formatting) - ; TOFIX: This sample crashes with mingw. + ; TOFIX: This sample crashes with mingw. [DONE] 2010-04-28 19:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/Makefile @@ -20885,7 +20895,7 @@ ; TODO: Move legacy Windows function names to xhb lib. This has the advantage that they can stay there - forever. + forever. [DONE] * contrib/hbwin/win_os.prg * Changed to use new function names. diff --git a/harbour/src/common/hbver.c b/harbour/src/common/hbver.c index bfc97274a7..765a273e54 100644 --- a/harbour/src/common/hbver.c +++ b/harbour/src/common/hbver.c @@ -290,11 +290,14 @@ char * hb_verPlatform( void ) case VER_PLATFORM_WIN32_NT: + #ifndef VER_NT_WORKSTATION + #define VER_NT_WORKSTATION 0x0000001 + #endif + if( osVer.dwMajorVersion == 6 ) { #if !defined( HB_OS_WIN_CE ) && !defined( __DMC__ ) && \ - ( !defined( _MSC_VER ) || _MSC_VER >= 1400 ) && \ - defined( VER_NT_WORKSTATION ) + ( !defined( _MSC_VER ) || _MSC_VER >= 1400 ) OSVERSIONINFOEX osVerEx; osVerEx.dwOSVersionInfoSize = sizeof( osVerEx ); @@ -323,7 +326,35 @@ char * hb_verPlatform( void ) pszName = ""; } else if( osVer.dwMajorVersion == 5 && osVer.dwMinorVersion >= 2 ) + { +#if !defined( HB_OS_WIN_CE ) && !defined( __DMC__ ) && \ + ( !defined( _MSC_VER ) || _MSC_VER >= 1400 ) + OSVERSIONINFOEX osVerEx; + + osVerEx.dwOSVersionInfoSize = sizeof( osVerEx ); + + if( GetVersionEx( ( OSVERSIONINFO * ) &osVerEx ) ) + { + if( osVerEx.wProductType == VER_NT_WORKSTATION ) + pszName = " XP x64"; + else + { + #ifndef SM_SERVERR2 + #define SM_SERVERR2 89 + #endif + + if( GetSystemMetrics( SM_SERVERR2 ) != 0 ) + pszName = " Server 2003 R2"; + else + pszName = " Server 2003"; + } + } + else + pszName = ""; +#else pszName = " Server 2003 / XP x64"; +#endif + } else if( osVer.dwMajorVersion == 5 && osVer.dwMinorVersion == 1 ) pszName = " XP"; else if( osVer.dwMajorVersion == 5 )