]> granicus.if.org Git - php/commitdiff
remove useless checks
authorAnatol Belski <ab@php.net>
Sat, 3 Oct 2015 08:57:32 +0000 (10:57 +0200)
committerAnatol Belski <ab@php.net>
Sat, 3 Oct 2015 08:57:32 +0000 (10:57 +0200)
Other platforms than listed in the checks are not supported since
PHP 5.5. We also won't need these checks for a while, so can simplify.

ext/opcache/shared_alloc_win32.c

index fd2894e6d8f910ca67d130569db79c0988739c05..9b7bfceec1424fb036ebda84d9adda37babc8072 100644 (file)
@@ -251,29 +251,7 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
           be taken (fail to map). So under Vista, we try to map into a hard coded predefined addresses
           in high memory. */
        if (!ZCG(accel_directives).mmap_base || !*ZCG(accel_directives).mmap_base) {
-               do {
-                       OSVERSIONINFOEX osvi;
-                       SYSTEM_INFO si;
-
-                       ZeroMemory(&si, sizeof(SYSTEM_INFO));
-                       ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
-
-                       osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
-                       if (! GetVersionEx ((OSVERSIONINFO *) &osvi)) {
-                               osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-                               if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
-                                       break;
-                               }
-                       }
-
-                       GetSystemInfo(&si);
-
-                       /* Are we running Vista ? */
-                       if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion >= 6) {
-                               wanted_mapping_base = vista_mapping_base_set;
-                       }
-               } while (0);
+               wanted_mapping_base = vista_mapping_base_set;
        } else {
                char *s = ZCG(accel_directives).mmap_base;