]> granicus.if.org Git - php/commitdiff
Remove the special disabled functions on Windows, since we don't even support those...
authorKalle Sommer Nielsen <kalle@php.net>
Sun, 29 Mar 2015 07:41:47 +0000 (09:41 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Sun, 29 Mar 2015 07:41:47 +0000 (09:41 +0200)
main/main.c
main/win32_internal_function_disabled.h [deleted file]

index a7f3bad31ee1b800fc867187db3f4482edb92f2c..c7468c2a96e328b38365932bc2525852c9a7060c 100644 (file)
@@ -126,34 +126,6 @@ php_core_globals core_globals;
 PHPAPI int core_globals_id;
 #endif
 
-#ifdef PHP_WIN32
-#include "win32_internal_function_disabled.h"
-
-static int php_win32_disable_functions(void)
-{
-       int i;
-
-       if (EG(windows_version_info).dwMajorVersion < 5) {
-               for (i = 0; i < function_name_cnt_5; i++) {
-                       if (zend_hash_str_del(CG(function_table), function_name_5[i], strlen(function_name_5[i]))==FAILURE) {
-                               php_printf("Unable to disable function '%s'\n", function_name_5[i]);
-                               return FAILURE;
-                       }
-               }
-       }
-
-       if (EG(windows_version_info).dwMajorVersion < 6) {
-               for (i = 0; i < function_name_cnt_6; i++) {
-                       if (zend_hash_str_del(CG(function_table), function_name_6[i], strlen(function_name_6[i]))==FAILURE) {
-                               php_printf("Unable to disable function '%s'\n", function_name_6[i]);
-                               return FAILURE;
-                       }
-               }
-       }
-       return SUCCESS;
-}
-#endif
-
 #define SAFE_FILENAME(f) ((f)?(f):"-")
 
 /* {{{ PHP_INI_MH
@@ -2254,15 +2226,6 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
                module->info_func = PHP_MINFO(php_core);
        }
 
-
-#ifdef PHP_WIN32
-       /* Disable incompatible functions for the running platform */
-       if (php_win32_disable_functions() == FAILURE) {
-               php_printf("Unable to disable unsupported functions\n");
-               return FAILURE;
-       }
-#endif
-
        zend_post_startup();
 
        module_initialized = 1;
diff --git a/main/win32_internal_function_disabled.h b/main/win32_internal_function_disabled.h
deleted file mode 100644 (file)
index 585df05..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP Version 7                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2015 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.01 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available through the world-wide-web at the following url:           |
-   | http://www.php.net/license/3_01.txt                                  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Author: Pierre A. Joye <pierre@php.net>                              |
-   +----------------------------------------------------------------------+
- */
-
-/* $Id$ */
-
-/* 5 means the min version is 5 (XP/2000), 6 (2k8/vista), etc. */
-
-/*
-Windows Server 2008     6.0
-Windows Vista           6.0
-
-Verssions below are not supported anymore, php won't even load:
-Windows Server 2003 R2  5.2
-Windows Server 2003     5.2
-Windows XP              5.1
-Windows 2000            5.0
-*/
-static const char *function_name_5[] = {NULL};
-const int function_name_cnt_5 = 0;
-static const char *function_name_6[] = {"readlink", "symlink", NULL};
-const int function_name_cnt_6 = 2;