From c07a056dac7d23f5f3cf12680bca5f4b16b2430e Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Mon, 29 May 2000 16:13:38 +0000 Subject: [PATCH] There's really no need for an entire file for a one line function... --- ext/standard/basic_functions.c | 11 +++++++++++ ext/standard/basic_functions.h | 2 ++ ext/standard/php_noavail.c | 27 --------------------------- ext/standard/php_noavail.h | 27 --------------------------- 4 files changed, 13 insertions(+), 54 deletions(-) delete mode 100644 ext/standard/php_noavail.c delete mode 100644 ext/standard/php_noavail.h diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 1d58694497..cac92c13b3 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -327,6 +327,8 @@ function_entry basic_functions[] = { PHP_FE(extension_loaded, NULL) PHP_FE(get_extension_funcs, NULL) + PHP_FE(warn_not_available, NULL) + PHP_FE(parse_ini_file, NULL) /* functions from reg.c */ @@ -2008,6 +2010,15 @@ PHP_FUNCTION(get_extension_funcs) /* }}} */ + +/* This function is not directly accessible to end users */ +PHP_FUNCTION(warn_not_available) +{ + php_error(E_WARNING, "%s() is not supported in this PHP build", get_active_function_name()); + RETURN_FALSE; +} + + /* * Local variables: * tab-width: 4 diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 76b7ee5430..c76bb54575 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -112,6 +112,8 @@ PHP_FUNCTION(get_loaded_extensions); PHP_FUNCTION(extension_loaded); PHP_FUNCTION(get_extension_funcs); +PHP_FUNCTION(warn_not_available); + /* From the INI parser */ PHP_FUNCTION(parse_ini_file); diff --git a/ext/standard/php_noavail.c b/ext/standard/php_noavail.c deleted file mode 100644 index 7a53d3f0e1..0000000000 --- a/ext/standard/php_noavail.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP version 4.0 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.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. | - +----------------------------------------------------------------------+ - | Authors: Hartmut Holzgraefe | - +----------------------------------------------------------------------+ -*/ - -#include "php_noavail.h" - -PHP_FUNCTION(warn_not_available) -{ -php_error(E_WARNING, - "%s() is not supported in this PHP build", - get_active_function_name()); - RETURN_FALSE; -} diff --git a/ext/standard/php_noavail.h b/ext/standard/php_noavail.h deleted file mode 100644 index a5dc3d78a5..0000000000 --- a/ext/standard/php_noavail.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP version 4.0 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.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. | - +----------------------------------------------------------------------+ - | Authors: Hartmut Holzgraefe | - +----------------------------------------------------------------------+ -*/ - - -#ifndef _PHP_NOAVAIL -#define _PHP_NOAVAIL - -#include "php.h" - -PHP_FUNCTION(warn_not_available); - -#endif /* _PHP_NOAVAIL */ -- 2.40.0