diff options
| author | Wez Furlong <wez@php.net> | 2001-04-17 17:08:03 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2001-04-17 17:08:03 +0000 |
| commit | 86c84da7c26c7a2668f4965fe29a3fd61d818ee0 (patch) | |
| tree | 65a8f541e630f3f5444c0eb5307cc70eddd02a3a | |
| parent | 57af70f70746cc3c70905b5bdad611119a686828 (diff) | |
| download | php-git-86c84da7c26c7a2668f4965fe29a3fd61d818ee0.tar.gz | |
Discovered warn_not_available and used it.
| -rw-r--r-- | ext/standard/basic_functions.c | 2 | ||||
| -rw-r--r-- | ext/standard/file.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 3e538ba5f8..61e7f82869 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -432,6 +432,8 @@ function_entry basic_functions[] = { PHP_FE(socket_set_blocking, NULL) #if HAVE_PHP_STREAM PHP_FE(fopenstream, NULL) +#else + PHP_FALIAS(fopenstream, warn_not_available, NULL) #endif #if HAVE_SYS_TIME_H PHP_FE(socket_set_timeout, NULL) diff --git a/ext/standard/file.c b/ext/standard/file.c index 8513feb895..b8c941706e 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -576,9 +576,9 @@ PHP_NAMED_FUNCTION(php_if_tmpfile) } /* }}} */ +#if HAVE_PHP_STREAM PHP_FUNCTION(fopenstream) { -#if HAVE_PHP_STREAM zval ** zfilename, ** zmode; php_stream * stream; @@ -595,11 +595,8 @@ PHP_FUNCTION(fopenstream) RETURN_FALSE; } ZEND_REGISTER_RESOURCE(return_value, stream, le_stream); -#else - zend_error(E_ERROR, "%s(): no stream support in this PHP build", get_active_function_name()); - RETURN_FALSE; -#endif } +#endif /* {{{ proto int fopen(string filename, string mode [, int use_include_path]) Open a file or a URL and return a file pointer */ |
