mirror of
https://github.com/php/php-src.git
synced 2026-04-28 02:33:17 +02:00
Fix reverse dependency
This commit is contained in:
@@ -55,6 +55,7 @@ ZEND_API void (*zend_unblock_interruptions)(void);
|
||||
ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
|
||||
ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
|
||||
|
||||
void (*zend_on_timeout)(int seconds TSRMLS_DC);
|
||||
|
||||
@@ -577,6 +578,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
zend_ticks_function = utility_functions->ticks_function;
|
||||
zend_on_timeout = utility_functions->on_timeout;
|
||||
zend_vspprintf = utility_functions->vspprintf_function;
|
||||
zend_getenv = utility_functions->getenv_function;
|
||||
|
||||
zend_compile_file = compile_file;
|
||||
zend_execute = execute;
|
||||
|
||||
@@ -357,6 +357,7 @@ typedef struct _zend_utility_functions {
|
||||
void (*on_timeout)(int seconds TSRMLS_DC);
|
||||
int (*stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
|
||||
int (*vspprintf_function)(char **pbuf, size_t max_len, const char *format, va_list ap);
|
||||
char *(*getenv_function)(char *name, size_t name_len TSRMLS_DC);
|
||||
} zend_utility_functions;
|
||||
|
||||
|
||||
@@ -492,6 +493,7 @@ extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, cons
|
||||
extern void (*zend_on_timeout)(int seconds TSRMLS_DC);
|
||||
extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
|
||||
extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
|
||||
extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
|
||||
|
||||
|
||||
ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "zend_constants.h"
|
||||
#include "zend_ini_scanner.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "SAPI.h"
|
||||
|
||||
#define YYSTYPE zval
|
||||
|
||||
@@ -140,7 +139,7 @@ void zend_ini_get_var(zval *result, zval *name)
|
||||
if (zend_get_configuration_directive(name->value.str.val, name->value.str.len+1, &curval) == SUCCESS) {
|
||||
result->value.str.val = zend_strndup(curval.value.str.val, curval.value.str.len);
|
||||
result->value.str.len = curval.value.str.len;
|
||||
} else if ((envvar = sapi_getenv(name->value.str.val, name->value.str.len TSRMLS_CC)) != NULL ||
|
||||
} else if ((envvar = zend_getenv(name->value.str.val, name->value.str.len TSRMLS_CC)) != NULL ||
|
||||
(envvar = getenv(name->value.str.val)) != NULL) {
|
||||
result->value.str.val = strdup(envvar);
|
||||
result->value.str.len = strlen(envvar);
|
||||
|
||||
@@ -1339,6 +1339,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
|
||||
zuf.on_timeout = php_on_timeout;
|
||||
zuf.stream_open_function = php_stream_open_for_zend;
|
||||
zuf.vspprintf_function = vspprintf;
|
||||
zuf.getenv_function = sapi_getenv;
|
||||
zend_startup(&zuf, NULL, 1);
|
||||
|
||||
#ifdef ZTS
|
||||
|
||||
Reference in New Issue
Block a user