From 696f6c7c939555ff291171237bf05b517c6c2daf Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 21 Apr 2010 23:22:20 +0000 Subject: [PATCH] - Fix ZTS build --- sapi/fpm/fpm/fpm_conf.c | 17 +++++++++-------- sapi/fpm/fpm/fpm_php.c | 1 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index f3edc9f05d..89911e1fc8 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -43,7 +43,7 @@ #include "fpm_status.h" #include "zlog.h" -static int fpm_conf_load_ini_file(char *filename); +static int fpm_conf_load_ini_file(char *filename TSRMLS_DC); static char *fpm_conf_set_integer(zval *value, void **config, intptr_t offset); static char *fpm_conf_set_time(zval *value, void **config, intptr_t offset); static char *fpm_conf_set_boolean(zval *value, void **config, intptr_t offset); @@ -673,7 +673,7 @@ static void fpm_conf_ini_parser_include(char *inc, void *arg TSRMLS_DC) /* {{{ * int len = strlen(g.gl_pathv[i]); if (len < 1) continue; if (g.gl_pathv[i][len - 1] == '/') continue; /* don't parse directories */ - if (0 > fpm_conf_load_ini_file(g.gl_pathv[i])) { + if (0 > fpm_conf_load_ini_file(g.gl_pathv[i] TSRMLS_CC)) { zlog(ZLOG_STUFF, ZLOG_ERROR, "Unable to include %s from %s at line %d", g.gl_pathv[i], filename, ini_lineno); *error = 1; return; @@ -682,7 +682,7 @@ static void fpm_conf_ini_parser_include(char *inc, void *arg TSRMLS_DC) /* {{{ * globfree(&g); } #else /* HAVE_GLOB */ - if (0 > fpm_conf_load_ini_file(inc)) { + if (0 > fpm_conf_load_ini_file(inc TSRMLS_CC)) { zlog(ZLOG_STUFF, ZLOG_ERROR, "Unable to include %s from %s at line %d", inc, filename, ini_lineno); *error = 1; return; @@ -848,13 +848,13 @@ static void fpm_conf_ini_parser(zval *arg1, zval *arg2, zval *arg3, int callback switch(callback_type) { case ZEND_INI_PARSER_ENTRY: - fpm_conf_ini_parser_entry(arg1, arg2, error); + fpm_conf_ini_parser_entry(arg1, arg2, error TSRMLS_CC); break;; case ZEND_INI_PARSER_SECTION: - fpm_conf_ini_parser_section(arg1, error); + fpm_conf_ini_parser_section(arg1, error TSRMLS_CC); break;; case ZEND_INI_PARSER_POP_ENTRY: - fpm_conf_ini_parser_array(arg1, arg3, arg2, error); + fpm_conf_ini_parser_array(arg1, arg3, arg2, error TSRMLS_CC); break;; default: zlog(ZLOG_STUFF, ZLOG_ERROR, "[%s:%d] Unknown INI syntax", ini_filename, ini_lineno); @@ -864,7 +864,7 @@ static void fpm_conf_ini_parser(zval *arg1, zval *arg2, zval *arg3, int callback } /* }}} */ -int fpm_conf_load_ini_file(char *filename) /* {{{ */ +int fpm_conf_load_ini_file(char *filename TSRMLS_DC) /* {{{ */ { int error = 0; char buf[1024+1]; @@ -936,13 +936,14 @@ int fpm_conf_init_main() /* {{{ */ char *filename = fpm_globals.config; int free = 0; int ret; + TSRMLS_FETCH(); if (filename == NULL) { spprintf(&filename, 0, "%s/php-fpm.conf", PHP_SYSCONFDIR); free = 1; } - ret = fpm_conf_load_ini_file(filename); + ret = fpm_conf_load_ini_file(filename TSRMLS_CC); if (0 > ret) { zlog(ZLOG_STUFF, ZLOG_ERROR, "failed to load configuration file '%s'", filename); diff --git a/sapi/fpm/fpm/fpm_php.c b/sapi/fpm/fpm/fpm_php.c index a9288ae140..ce5dac4bcf 100644 --- a/sapi/fpm/fpm/fpm_php.c +++ b/sapi/fpm/fpm/fpm_php.c @@ -113,7 +113,6 @@ int fpm_php_apply_defines_ex(struct key_value_s *kv, int mode) /* {{{ */ static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp) /* {{{ */ { - TSRMLS_FETCH(); struct key_value_s *kv; for (kv = wp->config->php_values; kv; kv = kv->next) { -- 2.40.0