From: Elan Ruusamäe Date: Mon, 3 Nov 2008 20:04:17 +0000 (+0000) Subject: - add again X-Git-Tag: auto/th/php-5_2_6-14~6 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=0cb5ea8cb08e2a27075404ab1a4b956c5bbd24ed;p=packages%2Fphp.git - add again Changed files: php-fpm-zts.patch -> 1.1 --- diff --git a/php-fpm-zts.patch b/php-fpm-zts.patch new file mode 100644 index 0000000..90cf2c1 --- /dev/null +++ b/php-fpm-zts.patch @@ -0,0 +1,190 @@ +--- php-5.2.6/sapi/cgi/fpm/fpm_php.c 2008-11-03 21:14:16.462343387 +0200 ++++ php-5.2.6-zts/sapi/cgi/fpm/fpm_php.c 2008-11-03 20:48:33.138185064 +0200 +@@ -19,7 +19,7 @@ + #include "fpm_cleanup.h" + #include "fpm_worker_pool.h" + +-static int zend_ini_alter_master(char *name, int name_length, char *new_value, int new_value_length, int stage) ++static int zend_ini_alter_master(char *name, int name_length, char *new_value, int new_value_length, int stage TSRMLS_DC) + { + zend_ini_entry *ini_entry; + char *duplicate; +@@ -32,7 +32,7 @@ + + if (!ini_entry->on_modify + || ini_entry->on_modify(ini_entry, duplicate, new_value_length, +- ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage) == SUCCESS) { ++ ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC) == SUCCESS) { + ini_entry->value = duplicate; + ini_entry->value_length = new_value_length; + } else { +@@ -42,7 +42,7 @@ + return SUCCESS; + } + +-static void fpm_php_disable(char *value, int (*zend_disable)(char *, uint)) ++static void fpm_php_disable(char *value, int (*zend_disable)(char *, uint TSRMLS_DC) TSRMLS_DC) + { + char *s = 0, *e = value; + +@@ -52,7 +52,7 @@ + case ',': + if (s) { + *e = '\0'; +- zend_disable(s, e - s); ++ zend_disable(s, e - s TSRMLS_CC); + s = 0; + } + break; +@@ -66,11 +66,11 @@ + } + + if (s) { +- zend_disable(s, e - s); ++ zend_disable(s, e - s TSRMLS_CC); + } + } + +-static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp) ++static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp TSRMLS_DC) + { + struct key_value_s *kv; + +@@ -89,29 +89,29 @@ + zval filename; + ZVAL_STRINGL(&filename, value, value_len, 0); + #if (PHP_MAJOR_VERSION >= 5) +- php_dl(&filename, MODULE_PERSISTENT, &zv, 1); ++ php_dl(&filename, MODULE_PERSISTENT, &zv, 1 TSRMLS_CC); + #else +- php_dl(&filename, MODULE_PERSISTENT, &zv); ++ php_dl(&filename, MODULE_PERSISTENT, &zv TSRMLS_CC); + #endif + #endif + continue; + } + +- zend_ini_alter_master(name, name_len + 1, value, value_len, PHP_INI_STAGE_ACTIVATE); ++ zend_ini_alter_master(name, name_len + 1, value, value_len, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); + + if (!strcmp(name, "disable_functions") && *value) { + char *v = strdup(value); + #if (PHP_MAJOR_VERSION >= 5) + PG(disable_functions) = v; + #endif +- fpm_php_disable(v, zend_disable_function); ++ fpm_php_disable(v, zend_disable_function TSRMLS_CC); + } + else if (!strcmp(name, "disable_classes") && *value) { + char *v = strdup(value); + #if (PHP_MAJOR_VERSION >= 5) + PG(disable_classes) = v; + #endif +- fpm_php_disable(v, zend_disable_class); ++ fpm_php_disable(v, zend_disable_class TSRMLS_CC); + } + } + +@@ -127,24 +127,24 @@ + return 0; + } + +-char *fpm_php_script_filename() ++char *fpm_php_script_filename(TSRMLS_D) + { + return SG(request_info).path_translated; + } + +-char *fpm_php_request_method() ++char *fpm_php_request_method(TSRMLS_D) + { + return (char *) SG(request_info).request_method; + } + +-size_t fpm_php_content_length() ++size_t fpm_php_content_length(TSRMLS_D) + { + return SG(request_info).content_length; + } + +-static void fpm_php_cleanup(int which, void *arg) ++static void fpm_php_cleanup(int which, void *arg TSRMLS_DC) + { +- php_module_shutdown(); ++ php_module_shutdown(TSRMLS_C); + sapi_shutdown(); + } + +@@ -155,14 +155,15 @@ + + int fpm_php_init_main() + { ++ // XXX unable to pass TSRMLS_CC to the cleanup func! + fpm_cleanup_add(FPM_CLEANUP_PARENT, fpm_php_cleanup, 0); + + return 0; + } + +-int fpm_php_init_child(struct fpm_worker_pool_s *wp) ++int fpm_php_init_child(struct fpm_worker_pool_s *wp TSRMLS_DC) + { +- if (0 > fpm_php_apply_defines(wp) || ++ if (0 > fpm_php_apply_defines(wp TSRMLS_CC) || + 0 > fpm_php_set_allowed_clients(wp)) { + return -1; + } +--- php-5.2.6-zts/sapi/cgi/fpm/fpm_php.h 2008-11-03 20:46:17.348139255 +0200 ++++ php-5.2.6/sapi/cgi/fpm/fpm_php.h 2008-11-03 21:40:41.811143906 +0200 +@@ -6,10 +6,11 @@ + #define FPM_PHP_H 1 + + #include "fpm_worker_pool.h" ++#include "TSRM.h" + + #include "build-defs.h" /* for PHP_ defines */ + +-int fpm_php_init_child(struct fpm_worker_pool_s *wp); ++int fpm_php_init_child(struct fpm_worker_pool_s *wp TSRMLS_DC); + char *fpm_php_script_filename(); + char *fpm_php_request_method(); + size_t fpm_php_content_length(); +--- php-5.2.6/sapi/cgi/fpm/fpm_php_trace.c 2008-11-03 21:14:16.462343387 +0200 ++++ php-5.2.6-zts/sapi/cgi/fpm/fpm_php_trace.c 2008-11-03 20:47:26.611462721 +0200 +@@ -35,7 +35,7 @@ + #endif + + +-static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog) ++static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog TSRMLS_DC) + { + int callers_limit = 20; + pid_t pid = child->pid; +@@ -131,7 +131,7 @@ + return 0; + } + +-void fpm_php_trace(struct fpm_child_s *child) ++void fpm_php_trace(struct fpm_child_s *child TSRMLS_DC) + { + FILE *slowlog; + +@@ -148,7 +148,7 @@ + goto done1; + } + +- if (0 > fpm_php_trace_dump(child, slowlog)) { ++ if (0 > fpm_php_trace_dump(child, slowlog TSRMLS_CC)) { + fprintf(slowlog, "+++ dump failed\n"); + } + +--- php-5.2.6/sapi/cgi/fpm/fpm_php_trace.h 2008-11-03 21:14:16.462343387 +0200 ++++ php-5.2.6-zts/sapi/cgi/fpm/fpm_php_trace.h 2008-11-03 20:47:38.411626098 +0200 +@@ -7,7 +7,7 @@ + + struct fpm_child_s; + +-void fpm_php_trace(struct fpm_child_s *); ++void fpm_php_trace(struct fpm_child_s *child TSRMLS_DC); + + #endif +