Pastey Patch for uname() from std/os.e v.2

# HG changeset patch
# User Insolor
# Date 1401985936 -14400
#      Thu Jun 05 20:32:16 2014 +0400
# Node ID 84c30c83253a63ba3f894a2749fffa2ec960fdf6
# Parent  d564cc9bc16457c52dded7735c6f923e780ef5fa
uname() fix and update

diff -r d564cc9bc164 -r 84c30c83253a include/std/os.e
--- a/include/std/os.e	Thu Jun 05 00:37:17 2014 -0300
+++ b/include/std/os.e	Thu Jun 05 20:32:16 2014 +0400
@@ -169,18 +169,30 @@
 				elsif mine = 90 then
 					sbuf = append(sbuf, "WinME")
 				else
-					sbuf = append(sbuf, "Unknown")
+					sbuf = append(sbuf, sprintf("Windows %d.%d", {maj,mine}))
 				end if
 			elsif plat = 2 then
 				sbuf = append(sbuf, "WinNT")
-				if maj = 6 and mine = 1 then
-					sbuf = append(sbuf, "Windows7")
-				elsif maj = 6 and mine = 0 then
-					sbuf = append(sbuf, "Vista")
-				elsif maj = 5 and mine = 1 or 2 then
-					sbuf = append(sbuf, "WinXP")
-				elsif maj = 5 and mine = 0 then
-					sbuf = append(sbuf, "Win2K")
+				if maj = 6 then
+					if mine = 0 then
+						sbuf = append(sbuf, "Vista") -- or Win2008
+					elsif mine = 1 then
+						sbuf = append(sbuf, "Windows7") -- or Win2008 R2
+					elsif mine = 2 then
+						sbuf = append(sbuf, "Windows8") -- or Win2012
+					elsif mine = 3 then
+						sbuf = append(sbuf, "Windows8.1")
+					else
+						sbuf = append(sbuf, sprintf("Windows %d.%d", {maj,mine}))
+					end if
+				elsif maj = 5 then
+					if mine = 0 then
+						sbuf = append(sbuf, "Win2K")
+					elsif mine = 1 then
+						sbuf = append(sbuf, "WinXP")
+					elsif mine = 2 then
+						sbuf = append(sbuf, "Win2003") -- according to http://msdn.microsoft.com/en-us/library/windows/desktop/ms724834%28v=vs.85%29.aspx
+					else
+						sbuf = append(sbuf, sprintf("Windows %d.%d", {maj,mine}))
+					end if
 				elsif maj = 4 and mine = 0 then
 					sbuf = append(sbuf, "WinNT 4.0")
 				elsif maj = 3 and mine = 51 then

1. Comment by andi49 Jun 15, 2014

Hi

As os.e uses GetVersionEx(), your patch wan't work for WIndows NT6.3 (eg WIndows8.1)

please have a look at: http://msdn.microsoft.com/en-us/library/windows/desktop/dn481241%28v=vs.85%29.aspx
You also need to change eu.manifest (see below)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<!-- These version numbers have nothing to do with 
  EUPHORIA version numbers.  They must not be changed for 
  version updates of EUPHORIA. --> 
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
<assemblyIdentity 
    version="4.1.0.0" 
    processorArchitecture="x86" 
    name="euphoria" 
    type="win32" 
/> 
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
    <application> 
      <!--This Id value indicates the application supports Windows 8.1 functionality--> 
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> 
       
    </application> 
  </compatibility> 
<dependency> 
    <dependentAssembly> 
        <assemblyIdentity 
            type="win32" 
            name="Microsoft.Windows.Common-Controls" 
            version="6.0.0.0" 
            processorArchitecture="*" 
            publicKeyToken="6595b64144ccf1df" 
            language="*" 
        /> 
    </dependentAssembly> 
</dependency> 
</assembly>