mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +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 (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) {
|
||||
if (osvi.wProductType == VER_NT_WORKSTATION) {
|
||||
major = "Windows Vista";
|
||||
if (osvi.dwMajorVersion == 6) {
|
||||
if( osvi.dwMinorVersion == 0 ) {
|
||||
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 {
|
||||
major = "Windows Server 2008";
|
||||
major = "Unknow Windows version";
|
||||
}
|
||||
|
||||
pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue