From a85156db7d8fed6e43fc3be87aa4bda5a6a5cd5a Mon Sep 17 00:00:00 2001 From: Christian Wenz Date: Mon, 15 Jun 2015 15:12:40 +0200 Subject: fixes bug #69835: phpinfo() does not report many Windows SKUs --- ext/standard/info.c | 224 ++++++++++++++++++++++++++++++++++++++++++++------ ext/standard/winver.h | 102 +++++++++++++++++------ 2 files changed, 275 insertions(+), 51 deletions(-) diff --git a/ext/standard/info.c b/ext/standard/info.c index d170f8a345..3e3eeeffdc 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -394,15 +394,18 @@ char* php_get_windows_name() case PRODUCT_ULTIMATE: sub = "Ultimate Edition"; break; - case PRODUCT_HOME_PREMIUM: - sub = "Home Premium Edition"; - break; case PRODUCT_HOME_BASIC: sub = "Home Basic Edition"; break; + case PRODUCT_HOME_PREMIUM: + sub = "Home Premium Edition"; + break; case PRODUCT_ENTERPRISE: sub = "Enterprise Edition"; break; + case PRODUCT_HOME_BASIC_N: + sub = "Home Basic N Edition"; + break; case PRODUCT_BUSINESS: if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) { sub = "Professional Edition"; @@ -410,12 +413,17 @@ char* php_get_windows_name() sub = "Business Edition"; } break; - case PRODUCT_BUSINESS_N: - if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) { - sub = "Professional N Edition"; - } else { - sub = "Business N Edition"; - } + case PRODUCT_STANDARD_SERVER: + sub = "Standard Edition"; + break; + case PRODUCT_DATACENTER_SERVER: + sub = "Datacenter Edition"; + break; + case PRODUCT_SMALLBUSINESS_SERVER: + sub = "Small Business Server"; + break; + case PRODUCT_ENTERPRISE_SERVER: + sub = "Enterprise Edition"; break; case PRODUCT_STARTER: if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) { @@ -424,17 +432,11 @@ char* php_get_windows_name() sub = "Starter Edition"; } break; - case PRODUCT_CLUSTER_SERVER: - sub = "Cluster Server Edition"; - break; - case PRODUCT_DATACENTER_SERVER: - sub = "Datacenter Edition"; - break; case PRODUCT_DATACENTER_SERVER_CORE: sub = "Datacenter Edition (core installation)"; break; - case PRODUCT_ENTERPRISE_SERVER: - sub = "Enterprise Edition"; + case PRODUCT_STANDARD_SERVER_CORE: + sub = "Standard Edition (core installation)"; break; case PRODUCT_ENTERPRISE_SERVER_CORE: sub = "Enterprise Edition (core installation)"; @@ -442,20 +444,192 @@ char* php_get_windows_name() case PRODUCT_ENTERPRISE_SERVER_IA64: sub = "Enterprise Edition for Itanium-based Systems"; break; - case PRODUCT_SMALLBUSINESS_SERVER: - sub = "Small Business Server"; + case PRODUCT_BUSINESS_N: + if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) { + sub = "Professional N Edition"; + } else { + sub = "Business N Edition"; + } + break; + case PRODUCT_WEB_SERVER: + sub = "Web Server Edition"; + break; + case PRODUCT_CLUSTER_SERVER: + sub = "HPC Edition"; + break; + case PRODUCT_HOME_SERVER: + sub = "Storage Server Essentials Edition"; + break; + case PRODUCT_STORAGE_EXPRESS_SERVER: + sub = "Storage Server Express Edition"; + break; + case PRODUCT_STORAGE_STANDARD_SERVER: + sub = "Storage Server Standard Edition"; + break; + case PRODUCT_STORAGE_WORKGROUP_SERVER: + sub = "Storage Server Workgroup Edition"; + break; + case PRODUCT_STORAGE_ENTERPRISE_SERVER: + sub = "Storage Server Enterprise Edition"; + break; + case PRODUCT_SERVER_FOR_SMALLBUSINESS: + sub = "Essential Server Solutions Edition"; break; case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM: sub = "Small Business Server Premium Edition"; break; - case PRODUCT_STANDARD_SERVER: - sub = "Standard Edition"; + case PRODUCT_HOME_PREMIUM_N: + sub = "Home Premium N Edition"; break; - case PRODUCT_STANDARD_SERVER_CORE: - sub = "Standard Edition (core installation)"; + case PRODUCT_ENTERPRISE_N: + sub = "Enterprise N Edition"; break; - case PRODUCT_WEB_SERVER: - sub = "Web Server Edition"; + case PRODUCT_ULTIMATE_N: + sub = "Ultimate N Edition"; + break; + case PRODUCT_WEB_SERVER_CORE: + sub = "Web Server Edition (core installation)"; + break; + case PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT: + sub = "Essential Business Server Management Server Edition"; + break; + case PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY: + sub = "Essential Business Server Management Security Edition"; + break; + case PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING: + sub = "Essential Business Server Management Messaging Edition"; + break; + case PRODUCT_SERVER_FOUNDATION: + sub = "Foundation Edition"; + break; + case PRODUCT_HOME_PREMIUM_SERVER: + sub = "Home Server 2011 Edition"; + break; + case PRODUCT_SERVER_FOR_SMALLBUSINESS_V: + sub = "Essential Server Solutions Edition (without Hyper-V)"; + break; + case PRODUCT_STANDARD_SERVER_V: + sub = "Standard Edition (without Hyper-V)"; + break; + case PRODUCT_DATACENTER_SERVER_V: + sub = "Datacenter Edition (without Hyper-V)"; + break; + case PRODUCT_ENTERPRISE_SERVER_V: + sub = "Enterprise Edition (without Hyper-V)"; + break; + case PRODUCT_DATACENTER_SERVER_CORE_V: + sub = "Datacenter Edition (core installation, without Hyper-V)"; + break; + case PRODUCT_STANDARD_SERVER_CORE_V: + sub = "Standard Edition (core installation, without Hyper-V)"; + break; + case PRODUCT_ENTERPRISE_SERVER_CORE_V: + sub = "Enterprise Edition (core installation, without Hyper-V)"; + break; + case PRODUCT_HYPERV: + sub = "Hyper-V Server"; + break; + case PRODUCT_STORAGE_EXPRESS_SERVER_CORE: + sub = "Storage Server Express Edition (core installation)"; + break; + case PRODUCT_STORAGE_STANDARD_SERVER_CORE: + sub = "Storage Server Standard Edition (core installation)"; + break; + case PRODUCT_STORAGE_WORKGROUP_SERVER_CORE: + sub = "Storage Server Workgroup Edition (core installation)"; + break; + case PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE: + sub = "Storage Server Enterprise Edition (core installation)"; + break; + case PRODUCT_STARTER_N: + sub = "Starter N Edition"; + break; + case PRODUCT_PROFESSIONAL: + sub = "Professional Edition"; + break; + case PRODUCT_PROFESSIONAL_N: + sub = "Professional N Edition"; + break; + case PRODUCT_SB_SOLUTION_SERVER: + sub = "Small Business Server 2011 Essentials Edition"; + break; + case PRODUCT_SERVER_FOR_SB_SOLUTIONS: + sub = "Server For SB Solutions Edition"; + break; + case PRODUCT_STANDARD_SERVER_SOLUTIONS: + sub = "Solutions Premium Edition"; + break; + case PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE: + sub = "Solutions Premium Edition (core installation)"; + break; + case PRODUCT_SB_SOLUTION_SERVER_EM: + sub = "Server For SB Solutions EM Edition"; + break; + case PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM: + sub = "Server For SB Solutions EM Edition"; + break; + case PRODUCT_SOLUTION_EMBEDDEDSERVER: + sub = "MultiPoint Server Edition"; + break; + case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT: + sub = "Essential Server Solution Management Edition"; + break; + case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL: + sub = "Essential Server Solution Additional Edition"; + break; + case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC: + sub = "Essential Server Solution Management SVC Edition"; + break; + case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC: + sub = "Essential Server Solution Additional SVC Edition"; + break; + case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE: + sub = "Small Business Server Premium Edition (core installation)"; + break; + case PRODUCT_CLUSTER_SERVER_V: + sub = "Hyper Core V Edition"; + break; + case PRODUCT_STARTER_E: + sub = "Hyper Core V Edition"; + break; + case PRODUCT_ENTERPRISE_EVALUATION: + sub = "Enterprise Edition (evaluation installation)"; + break; + case PRODUCT_MULTIPOINT_STANDARD_SERVER: + sub = "MultiPoint Server Standard Edition (full installation)"; + break; + case PRODUCT_MULTIPOINT_PREMIUM_SERVER: + sub = "MultiPoint Server Premium Edition (full installation)"; + break; + case PRODUCT_STANDARD_EVALUATION_SERVER: + sub = "Standard Edition (evaluation installation)"; + break; + case PRODUCT_DATACENTER_EVALUATION_SERVER: + sub = "Datacenter Edition (evaluation installation)"; + break; + case PRODUCT_ENTERPRISE_N_EVALUATION: + sub = "Enterprise N Edition (evaluation installation)"; + break; + case PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER: + sub = "Storage Server Workgroup Edition (evaluation installation)"; + break; + case PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER: + sub = "Storage Server Standard Edition (evaluation installation)"; + break; + case PRODUCT_CORE_N: + sub = "Windows 8 N Edition"; + break; + case PRODUCT_CORE_COUNTRYSPECIFIC: + sub = "Windows 8 China Edition"; + break; + case PRODUCT_CORE_SINGLELANGUAGE: + sub = "Windows 8 Single Language Edition"; + break; + case PRODUCT_CORE: + sub = "Windows 8 Edition"; + break; + case PRODUCT_PROFESSIONAL_WMC: + sub = "Professional with Media Center Edition"; break; } } diff --git a/ext/standard/winver.h b/ext/standard/winver.h index 7152d60811..ba46c90a7c 100644 --- a/ext/standard/winver.h +++ b/ext/standard/winver.h @@ -18,32 +18,82 @@ #endif #ifndef PRODUCT_ULTIMATE -#define PRODUCT_UNDEFINED 0x00000000 -#define PRODUCT_ULTIMATE 0x00000001 -#define PRODUCT_HOME_BASIC 0x00000002 -#define PRODUCT_HOME_PREMIUM 0x00000003 -#define PRODUCT_ENTERPRISE 0x00000004 -#define PRODUCT_HOME_BASIC_N 0x00000005 -#define PRODUCT_BUSINESS 0x00000006 -#define PRODUCT_STANDARD_SERVER 0x00000007 -#define PRODUCT_DATACENTER_SERVER 0x00000008 -#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 -#define PRODUCT_ENTERPRISE_SERVER 0x0000000A -#define PRODUCT_STARTER 0x0000000B -#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C -#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D -#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E -#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F -#define PRODUCT_BUSINESS_N 0x00000010 -#define PRODUCT_WEB_SERVER 0x00000011 -#define PRODUCT_CLUSTER_SERVER 0x00000012 -#define PRODUCT_HOME_SERVER 0x00000013 -#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 -#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 -#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 -#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 -#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 -#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 +#define PRODUCT_UNDEFINED 0x00000000 +#define PRODUCT_ULTIMATE 0x00000001 +#define PRODUCT_HOME_BASIC 0x00000002 +#define PRODUCT_HOME_PREMIUM 0x00000003 +#define PRODUCT_ENTERPRISE 0x00000004 +#define PRODUCT_HOME_BASIC_N 0x00000005 +#define PRODUCT_BUSINESS 0x00000006 +#define PRODUCT_STANDARD_SERVER 0x00000007 +#define PRODUCT_DATACENTER_SERVER 0x00000008 +#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 +#define PRODUCT_ENTERPRISE_SERVER 0x0000000A +#define PRODUCT_STARTER 0x0000000B +#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C +#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D +#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E +#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F +#define PRODUCT_BUSINESS_N 0x00000010 +#define PRODUCT_WEB_SERVER 0x00000011 +#define PRODUCT_CLUSTER_SERVER 0x00000012 +#define PRODUCT_HOME_SERVER 0x00000013 +#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 +#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 +#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 +#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 +#define PRODUCT_HOME_PREMIUM_N 0x0000001A +#define PRODUCT_ENTERPRISE_N 0x0000001B +#define PRODUCT_ULTIMATE_N 0x0000001C +#define PRODUCT_WEB_SERVER_CORE 0x0000001D +#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E +#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 +#define PRODUCT_SERVER_FOUNDATION 0x00000021 +#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +#define PRODUCT_STANDARD_SERVER_V 0x00000024 +#define PRODUCT_DATACENTER_SERVER_V 0x00000025 +#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026 +#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 +#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 +#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 +#define PRODUCT_HYPERV 0x0000002A +#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B +#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C +#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D +#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E +#define PRODUCT_STARTER_N 0x0000002F +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 +#define PRODUCT_SB_SOLUTION_SERVER 0x00000032 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035 +#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037 +#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038 +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F +#define PRODUCT_CLUSTER_SERVER_V 0x00000040 +#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048 +#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C +#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D +#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F +#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 +#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 +#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F +#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060 +#define PRODUCT_CORE_N 0x00000062 +#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063 +#define PRODUCT_CORE_SINGLELANGUAGE 0x00000064 +#define PRODUCT_CORE 0x00000065 +#define PRODUCT_PROFESSIONAL_WMC 0x00000067 #endif #ifndef VER_NT_WORKSTATION -- cgit v1.2.1