1 --- php-5.2.6/sapi/cgi/fpm/fpm_php.c 2008-11-03 21:14:16.462343387 +0200
2 +++ php-5.2.6-zts/sapi/cgi/fpm/fpm_php.c 2008-11-03 20:48:33.138185064 +0200
4 #include "fpm_cleanup.h"
5 #include "fpm_worker_pool.h"
7 -static int zend_ini_alter_master(char *name, int name_length, char *new_value, int new_value_length, int stage)
8 +static int zend_ini_alter_master(char *name, int name_length, char *new_value, int new_value_length, int stage TSRMLS_DC)
10 zend_ini_entry *ini_entry;
14 if (!ini_entry->on_modify
15 || ini_entry->on_modify(ini_entry, duplicate, new_value_length,
16 - ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage) == SUCCESS) {
17 + ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC) == SUCCESS) {
18 ini_entry->value = duplicate;
19 ini_entry->value_length = new_value_length;
25 -static void fpm_php_disable(char *value, int (*zend_disable)(char *, uint))
26 +static void fpm_php_disable(char *value, int (*zend_disable)(char *, uint TSRMLS_DC) TSRMLS_DC)
28 char *s = 0, *e = value;
34 - zend_disable(s, e - s);
35 + zend_disable(s, e - s TSRMLS_CC);
43 - zend_disable(s, e - s);
44 + zend_disable(s, e - s TSRMLS_CC);
48 -static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp)
49 +static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp TSRMLS_DC)
51 struct key_value_s *kv;
55 ZVAL_STRINGL(&filename, value, value_len, 0);
56 #if (PHP_MAJOR_VERSION >= 5)
57 - php_dl(&filename, MODULE_PERSISTENT, &zv, 1);
58 + php_dl(&filename, MODULE_PERSISTENT, &zv, 1 TSRMLS_CC);
60 - php_dl(&filename, MODULE_PERSISTENT, &zv);
61 + php_dl(&filename, MODULE_PERSISTENT, &zv TSRMLS_CC);
67 - zend_ini_alter_master(name, name_len + 1, value, value_len, PHP_INI_STAGE_ACTIVATE);
68 + zend_ini_alter_master(name, name_len + 1, value, value_len, PHP_INI_STAGE_ACTIVATE TSRMLS_CC);
70 if (!strcmp(name, "disable_functions") && *value) {
71 char *v = strdup(value);
72 #if (PHP_MAJOR_VERSION >= 5)
73 PG(disable_functions) = v;
75 - fpm_php_disable(v, zend_disable_function);
76 + fpm_php_disable(v, zend_disable_function TSRMLS_CC);
78 else if (!strcmp(name, "disable_classes") && *value) {
79 char *v = strdup(value);
80 #if (PHP_MAJOR_VERSION >= 5)
81 PG(disable_classes) = v;
83 - fpm_php_disable(v, zend_disable_class);
84 + fpm_php_disable(v, zend_disable_class TSRMLS_CC);
92 -char *fpm_php_script_filename()
93 +char *fpm_php_script_filename(TSRMLS_D)
95 return SG(request_info).path_translated;
98 -char *fpm_php_request_method()
99 +char *fpm_php_request_method(TSRMLS_D)
101 return (char *) SG(request_info).request_method;
104 -size_t fpm_php_content_length()
105 +size_t fpm_php_content_length(TSRMLS_D)
107 return SG(request_info).content_length;
110 -static void fpm_php_cleanup(int which, void *arg)
111 +static void fpm_php_cleanup(int which, void *arg TSRMLS_DC)
113 - php_module_shutdown();
114 + php_module_shutdown(TSRMLS_C);
118 @@ -155,14 +155,15 @@
120 int fpm_php_init_main()
122 + // XXX unable to pass TSRMLS_CC to the cleanup func!
123 fpm_cleanup_add(FPM_CLEANUP_PARENT, fpm_php_cleanup, 0);
128 -int fpm_php_init_child(struct fpm_worker_pool_s *wp)
129 +int fpm_php_init_child(struct fpm_worker_pool_s *wp TSRMLS_DC)
131 - if (0 > fpm_php_apply_defines(wp) ||
132 + if (0 > fpm_php_apply_defines(wp TSRMLS_CC) ||
133 0 > fpm_php_set_allowed_clients(wp)) {
136 --- php-5.2.6-zts/sapi/cgi/fpm/fpm_php.h 2008-11-03 20:46:17.348139255 +0200
137 +++ php-5.2.6/sapi/cgi/fpm/fpm_php.h 2008-11-03 21:40:41.811143906 +0200
141 #include "fpm_worker_pool.h"
144 #include "build-defs.h" /* for PHP_ defines */
146 -int fpm_php_init_child(struct fpm_worker_pool_s *wp);
147 +int fpm_php_init_child(struct fpm_worker_pool_s *wp TSRMLS_DC);
148 char *fpm_php_script_filename();
149 char *fpm_php_request_method();
150 size_t fpm_php_content_length();
151 --- php-5.2.6/sapi/cgi/fpm/fpm_php_trace.c 2008-11-03 21:14:16.462343387 +0200
152 +++ php-5.2.6-zts/sapi/cgi/fpm/fpm_php_trace.c 2008-11-03 20:47:26.611462721 +0200
157 -static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog)
158 +static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog TSRMLS_DC)
160 int callers_limit = 20;
161 pid_t pid = child->pid;
166 -void fpm_php_trace(struct fpm_child_s *child)
167 +void fpm_php_trace(struct fpm_child_s *child TSRMLS_DC)
175 - if (0 > fpm_php_trace_dump(child, slowlog)) {
176 + if (0 > fpm_php_trace_dump(child, slowlog TSRMLS_CC)) {
177 fprintf(slowlog, "+++ dump failed\n");
180 --- php-5.2.6/sapi/cgi/fpm/fpm_php_trace.h 2008-11-03 21:14:16.462343387 +0200
181 +++ php-5.2.6-zts/sapi/cgi/fpm/fpm_php_trace.h 2008-11-03 20:47:38.411626098 +0200
186 -void fpm_php_trace(struct fpm_child_s *);
187 +void fpm_php_trace(struct fpm_child_s *child TSRMLS_DC);