mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
- Added recent Windows versions to php_uname and fix undefined windows version
This commit is contained in:
parent
5dba22d79e
commit
91721f73f2
1 changed files with 15 additions and 4 deletions
|
@ -281,11 +281,22 @@ char* php_get_windows_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) {
|
if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) {
|
||||||
if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) {
|
if (osvi.dwMajorVersion == 6) {
|
||||||
if (osvi.wProductType == VER_NT_WORKSTATION) {
|
if( osvi.dwMinorVersion == 0 ) {
|
||||||
major = "Windows Vista";
|
if( osvi.wProductType == VER_NT_WORKSTATION ) {
|
||||||
|
major = "Windows Vista";
|
||||||
|
} else {
|
||||||
|
major = "Windows Server 2008";
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if ( osvi.dwMinorVersion == 1 ) {
|
||||||
|
if( osvi.wProductType == VER_NT_WORKSTATION ) {
|
||||||
|
major = "Windows 7";
|
||||||
|
} else {
|
||||||
|
major = "Windows Server 2008 R2";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
major = "Windows Server 2008";
|
major = "Unknow Windows version";
|
||||||
}
|
}
|
||||||
|
|
||||||
pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo");
|
pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue